Mercurial > dovecot > core-2.2
view src/lib-storage/mail-error.c @ 19604:c996bc091c6b
master: Do not close stdout if going foreground
This lets one to use /dev/stdout for logging. Mainly
useful for testing purposes where we can generate
log output to stdout and use tee to write it to a
file for later examination.
author | Aki Tuomi <aki.tuomi@dovecot.fi> |
---|---|
date | Mon, 18 Jan 2016 15:50:23 +0200 |
parents | 0f22db71df7a |
children | 2e2563132d5f |
line wrap: on
line source
/* Copyright (c) 2007-2016 Dovecot authors, see the included COPYING file */ #include "lib.h" #include "eacces-error.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 (ENOQUOTA(errno)) { *error_r = MAIL_ERROR_NOQUOTA; *error_string_r = MAIL_ERRSTR_NO_QUOTA; } 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; } const char *mail_error_eacces_msg(const char *func, const char *path) { return eacces_error_get(func, path); } const char *mail_error_create_eacces_msg(const char *func, const char *path) { return eacces_error_get_creating(func, path); }