dovecot-2.2: doveadm fs: Improved error message logging.
dovecot at dovecot.org
dovecot at dovecot.org
Tue May 12 18:54:05 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/c4bef3533ecd
changeset: 18655:c4bef3533ecd
user: Timo Sirainen <tss at iki.fi>
date: Tue May 12 21:52:07 2015 +0300
description:
doveadm fs: Improved error message logging.
diffstat:
src/doveadm/doveadm-fs.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diffs (31 lines):
diff -r 04e169b3bfe6 -r c4bef3533ecd src/doveadm/doveadm-fs.c
--- a/src/doveadm/doveadm-fs.c Tue May 12 19:43:48 2015 +0300
+++ b/src/doveadm/doveadm-fs.c Tue May 12 21:52:07 2015 +0300
@@ -70,7 +70,8 @@
i_error("%s doesn't exist", fs_file_path(file));
doveadm_exit_code = DOVEADM_EX_NOTFOUND;
} else if (input->stream_errno != 0) {
- i_error("read(%s) failed: %m", fs_file_path(file));
+ i_error("read(%s) failed: %s", fs_file_path(file),
+ fs_file_last_error(file));
doveadm_exit_code = EX_TEMPFAIL;
}
i_stream_unref(&input);
@@ -126,10 +127,13 @@
output = fs_write_stream(file);
input = i_stream_create_file(src_path, IO_BLOCK_SIZE);
if ((ret = o_stream_send_istream(output, input)) < 0) {
- if (output->stream_errno != 0)
- i_error("write(%s) failed: %m", dest_path);
- else
- i_error("read(%s) failed: %m", src_path);
+ if (output->stream_errno != 0) {
+ i_error("write(%s) failed: %s", dest_path,
+ o_stream_get_error(output));
+ } else {
+ i_error("read(%s) failed: %s", src_path,
+ i_stream_get_error(input));
+ }
doveadm_exit_code = EX_TEMPFAIL;
}
i_stream_destroy(&input);
More information about the dovecot-cvs
mailing list