Mercurial > dovecot > original-hg > dovecot-1.2
view src/lib-storage/mail-error.c @ 7086:7ed926ed7aa4 HEAD
Updated copyright notices to include year 2008.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 01 Jan 2008 22:05:21 +0200 |
parents | 47c3c4d41b26 |
children | 1e42b631f037 |
line wrap: on
line source
/* Copyright (c) 2007-2008 Dovecot authors, see the included COPYING file */ #include "lib.h" #include "mail-error.h" bool mail_error_from_errno(enum mail_error *error_r, const char **error_string_r) { if (ENOACCESS(errno)) { *error_r = MAIL_ERROR_PERM; *error_string_r = MAIL_ERRSTR_NO_PERMISSION; } else if (ENOSPACE(errno)) { *error_r = MAIL_ERROR_NOSPACE; *error_string_r = MAIL_ERRSTR_NO_SPACE; } else if (ENOTFOUND(errno)) { *error_r = MAIL_ERROR_NOTFOUND; *error_string_r = errno != ELOOP ? "Not found" : "Directory structure is broken"; } else { return FALSE; } return TRUE; }