Patchwork libquota: log an error message if ext2fs_file_open() fails

login
register
mail settings
Submitter Theodore Ts'o
Date Nov. 15, 2011, 5:05 a.m.
Message ID <1321333509-4607-2-git-send-email-tytso@mit.edu>
Download mbox | patch
Permalink /patch/125669/
State Accepted
Headers show

Comments

Theodore Ts'o - Nov. 15, 2011, 5:05 a.m.
This also fixes a format string type compiler warning.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
 lib/quota/quotaio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/lib/quota/quotaio.c b/lib/quota/quotaio.c
index 6edb0b0..d0b5b9d 100644
--- a/lib/quota/quotaio.c
+++ b/lib/quota/quotaio.c
@@ -232,7 +232,7 @@  errcode_t quota_file_open(struct quota_handle *h, ext2_filsys fs,
 	log_debug("Opening quota ino=%lu, type=%d", qf_ino, type);
 	err = ext2fs_file_open(fs, qf_ino, flags, &e2_file);
 	if (err) {
-		log_err("ext2fs_file_open failed: %d", err);
+		log_err("ext2fs_file_open failed: %s", error_message(err));
 		return err;
 	}
 	h->qh_qf.e2_file = e2_file;