[quota/f17] Make sure option -d at quotacheck provides at least as much information as option -v

Petr Pisar ppisar at fedoraproject.org
Tue Feb 5 08:47:48 UTC 2013


commit e012608d326e87f165c0f6ed8e37e3b43e742b20
Author: Petr Písař <ppisar at redhat.com>
Date:   Tue Feb 5 09:03:01 2013 +0100

    Make sure option -d at quotacheck provides at least as much information as option -v

 ...Make-sure-d-provides-at-least-as-much-inf.patch |   63 ++++++++++++++++++++
 quota.spec                                         |    5 ++
 2 files changed, 68 insertions(+), 0 deletions(-)
---
diff --git a/quota-4.00-quotacheck-Make-sure-d-provides-at-least-as-much-inf.patch b/quota-4.00-quotacheck-Make-sure-d-provides-at-least-as-much-inf.patch
new file mode 100644
index 0000000..b20d990
--- /dev/null
+++ b/quota-4.00-quotacheck-Make-sure-d-provides-at-least-as-much-inf.patch
@@ -0,0 +1,63 @@
+From 927a4f1d8b6f78c6695be2e87f656ef31fe4db06 Mon Sep 17 00:00:00 2001
+From: Jan Kara <jack at suse.cz>
+Date: Mon, 4 Feb 2013 23:21:30 +0100
+Subject: [PATCH] quotacheck: Make sure -d provides at least as much
+ information as -v
+
+There was a couple of useful messages that were printed when -v was
+specified but not when -d was specified. Fix this.
+
+Signed-off-by: Jan Kara <jack at suse.cz>
+---
+ quotacheck.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/quotacheck.c b/quotacheck.c
+index 24aaad7..094291e 100644
+--- a/quotacheck.c
++++ b/quotacheck.c
+@@ -880,12 +880,12 @@ static int sub_quota_file(struct mntent *mnt, int qtype, int ftype)
+ 
+ 	debug(FL_DEBUG, _("Substracting space used by old %s quota file.\n"), type2name(ftype));
+ 	if (get_qf_name(mnt, ftype, cfmt, 0, &filename) < 0) {
+-		debug(FL_VERBOSE, _("Old %s file name could not been determined. Usage will not be substracted.\n"), type2name(ftype));
++		debug(FL_VERBOSE | FL_DEBUG, _("Old %s file name could not been determined. Usage will not be substracted.\n"), type2name(ftype));
+ 		return 0;
+ 	}
+ 
+ 	if (stat(filename, &st) < 0) {
+-		debug(FL_VERBOSE, _("Cannot stat old %s quota file %s: %s. Usage will not be substracted.\n"), type2name(ftype), filename, strerror(errno));
++		debug(FL_VERBOSE | FL_DEBUG, _("Cannot stat old %s quota file %s: %s. Usage will not be substracted.\n"), type2name(ftype), filename, strerror(errno));
+ 		free(filename);
+ 		return 0;
+ 	}
+@@ -961,7 +961,7 @@ Please stop all programs writing to filesystem or use -m flag to force checking.
+ 		debug(FL_DEBUG, _("Filesystem remounted read-only\n"));
+ 	}
+ start_scan:
+-	debug(FL_VERBOSE, _("Scanning %s [%s] "), mnt->mnt_fsname, mnt->mnt_dir);
++	debug(FL_VERBOSE | FL_DEBUG, _("Scanning %s [%s] "), mnt->mnt_fsname, mnt->mnt_dir);
+ #if defined(EXT2_DIRECT)
+ 	if (!strcmp(mnt->mnt_type, MNTTYPE_EXT2) || !strcmp(mnt->mnt_type, MNTTYPE_EXT3) || !strcmp(mnt->mnt_type, MNTTYPE_NEXT3)) {
+ 		if ((failed = ext2_direct_scan(mnt->mnt_fsname)) < 0)
+@@ -977,7 +977,7 @@ start_scan:
+ 			goto out;
+ 	}
+ 	dirs_done++;
+-	if (flags & FL_VERBOSE || flags & FL_VERYVERBOSE)
++	if (flags & FL_VERBOSE || flags & FL_DEBUG)
+ 		fputs(_("done\n"), stdout);
+ 	if (ucheck) {
+ 		failed |= sub_quota_file(mnt, USRQUOTA, USRQUOTA);
+@@ -1138,7 +1138,7 @@ static int check_all(void)
+ 			debug(FL_DEBUG, _("Detected quota format %s\n"), fmt2name(cfmt));
+ 		}
+ 
+-		if (flags & FL_VERBOSE && !hasmntopt(mnt, MNTOPT_USRJQUOTA) &&
++		if (flags & (FL_VERBOSE | FL_DEBUG) && !hasmntopt(mnt, MNTOPT_USRJQUOTA) &&
+ 		    !hasmntopt(mnt, MNTOPT_GRPJQUOTA) && !warned &&
+ 		    (!strcmp(mnt->mnt_type, MNTTYPE_EXT3) ||
+ 		     !strcmp(mnt->mnt_type, MNTTYPE_EXT4) ||
+-- 
+1.8.1.2
+
diff --git a/quota.spec b/quota.spec
index fbdb872..5b12690 100644
--- a/quota.spec
+++ b/quota.spec
@@ -44,6 +44,8 @@ Patch11: quota-4.01-Make-group-warning-message-more-official.patch
 Patch12: quota-4.01-define_charset_in_mail.patch
 # In upstream after 4.01, SF#3602786, bug #846296
 Patch13: quota-4.00-Do-not-fiddle-with-quota-files-on-XFS-and-GFS.patch
+# In upstream after 4.01, SF#3602777
+Patch14: quota-4.00-quotacheck-Make-sure-d-provides-at-least-as-much-inf.patch
 
 
 %description
@@ -129,6 +131,7 @@ Linux/UNIX environment.
 %patch11 -p1 -b .group_warning
 %patch12 -p1 -b .charset_in_mail
 %patch13 -p1 -b .gfs_files
+%patch14 -p1 -b .quotackeck_debug
 
 #fix typos/mistakes in localized documentation
 for pofile in $(find ./po/*.p*)
@@ -258,6 +261,8 @@ echo '  systemd-sysv-convert --apply quota_nld'
 - Make group warning message more official
 - Define charset in e-mails sent by warnquota (SF#3571589)
 - Do not fiddle with quota files on XFS and GFS (bug #846296)
+- Make sure option -d at quotacheck provides at least as much information as
+  option -v (SF#3602777)
 
 * Fri Sep 07 2012 Petr Pisar <ppisar at redhat.com> - 1:4.00-5
 - Fix reporting for NFSv3 mount points


More information about the scm-commits mailing list