Blame quota-4.00_pre1-get_qf_name-does-not-check-quota-file-presence.patch

576e13
From 1c3bc6d34439f353ea00239dc1ca31239823bb4f Mon Sep 17 00:00:00 2001
576e13
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
576e13
Date: Fri, 1 Jul 2011 10:22:10 +0200
576e13
Subject: [PATCH 2/2] get_qf_name() does not check quota file presence
576e13
576e13
Old error messsage stated a quota file does not exist despite fact
576e13
get_qf_name() does not check the file existence. It constructs the
576e13
file name only.
576e13
576e13
This lead to misleading message when running initial `quotacheck -c'
576e13
on extended file system mounted with usrquota option only.
576e13
576e13
Signed-off-by: Jan Kara <jack@suse.cz>
576e13
---
576e13
 quotacheck.c |    4 ++--
576e13
 1 files changed, 2 insertions(+), 2 deletions(-)
576e13
576e13
diff --git a/quotacheck.c b/quotacheck.c
576e13
index 112596b..d8515af 100644
576e13
--- a/quotacheck.c
576e13
+++ b/quotacheck.c
576e13
@@ -873,12 +873,12 @@ static int sub_quota_file(struct mntent *mnt, int qtype, int ftype)
576e13
 
576e13
 	debug(FL_DEBUG, _("Substracting space used by old %s quota file.\n"), type2name(ftype));
576e13
 	if (get_qf_name(mnt, ftype, cfmt, 0, &filename) < 0) {
576e13
-		debug(FL_VERBOSE, _("Old %s file not found. Usage will not be substracted.\n"), type2name(ftype));
576e13
+		debug(FL_VERBOSE, _("Old %s file name could not been determined. Usage will not be substracted.\n"), type2name(ftype));
576e13
 		return 0;
576e13
 	}
576e13
 
576e13
 	if (stat(filename, &st) < 0) {
576e13
-		debug(FL_VERBOSE, _("Cannot stat old %s quota file: %s\n"), type2name(ftype), strerror(errno));
576e13
+		debug(FL_VERBOSE, _("Cannot stat old %s quota file %s: %s. Usage will not be substracted.\n"), type2name(ftype), filename, strerror(errno));
576e13
 		free(filename);
576e13
 		return 0;
576e13
 	}
576e13
-- 
576e13
1.7.6
576e13