dovecot-2.0: fs-sis: Don't use %m when logging errors.
dovecot at dovecot.org
dovecot at dovecot.org
Sat Oct 2 14:34:01 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/d26b67e143cf
changeset: 12249:d26b67e143cf
user: Timo Sirainen <tss at iki.fi>
date: Fri Aug 13 18:24:31 2010 +0100
description:
fs-sis: Don't use %m when logging errors.
diffstat:
src/lib-fs/fs-sis.c | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diffs (46 lines):
diff -r 37a0158f2e4c -r d26b67e143cf src/lib-fs/fs-sis.c
--- a/src/lib-fs/fs-sis.c Fri Aug 13 17:40:01 2010 +0100
+++ b/src/lib-fs/fs-sis.c Fri Aug 13 18:24:31 2010 +0100
@@ -227,8 +227,9 @@
a duplicate, but it's too much trouble
trying to deduplicate it anymore */
} else {
- i_error("fs-sis: link(%s, %s) failed: %m",
- path, file->hash_path);
+ i_error("fs-sis: link(%s, %s) failed: %s",
+ path, file->hash_path,
+ fs_last_error(file->super->fs));
}
}
return;
@@ -253,22 +254,24 @@
try to continue. */
if (fs_unlink(file->super->fs, str_c(temp_path)) < 0 &&
errno != ENOENT) {
- i_error("fs-sis: unlink(%s) failed: %m",
- str_c(temp_path));
+ i_error("fs-sis: unlink(%s) failed: %s",
+ str_c(temp_path),
+ fs_last_error(file->super->fs));
}
ret = fs_link(file->super->fs, path, str_c(temp_path));
}
if (ret < 0) {
- i_error("fs-sis: link(%s, %s) failed: %m",
- path, str_c(temp_path));
+ i_error("fs-sis: link(%s, %s) failed: %s",
+ path, str_c(temp_path), fs_last_error(file->super->fs));
return;
}
if (fs_rename(file->super->fs, str_c(temp_path), file->hash_path) < 0) {
if (errno == ENOENT) {
/* apparently someone else just renamed it. ignore. */
} else {
- i_error("fs-sis: rename(%s, %s) failed: %m",
- str_c(temp_path), file->hash_path);
+ i_error("fs-sis: rename(%s, %s) failed: %s",
+ str_c(temp_path), file->hash_path,
+ fs_last_error(file->super->fs));
}
(void)fs_unlink(file->super->fs, str_c(temp_path));
}
More information about the dovecot-cvs
mailing list