|
|
7c06a3 |
From 8985a04067eb396877593db102d4a535c8a2871a Mon Sep 17 00:00:00 2001
|
|
|
7c06a3 |
From: Jan Kara <jack@suse.cz>
|
|
|
7c06a3 |
Date: Mon, 4 Feb 2013 23:21:30 +0100
|
|
|
7c06a3 |
Subject: [PATCH] quotacheck: Make sure -d provides at least as much
|
|
|
7c06a3 |
information as -v
|
|
|
7c06a3 |
|
|
|
7c06a3 |
There was a couple of useful messages that were printed when -v was
|
|
|
7c06a3 |
specified but not when -d was specified. Fix this.
|
|
|
7c06a3 |
|
|
|
7c06a3 |
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
|
7c06a3 |
---
|
|
|
7c06a3 |
quotacheck.c | 10 +++++-----
|
|
|
7c06a3 |
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
|
7c06a3 |
|
|
|
7c06a3 |
diff --git a/quotacheck.c b/quotacheck.c
|
|
|
7c06a3 |
index e047825..e62c3a7 100644
|
|
|
7c06a3 |
--- a/quotacheck.c
|
|
|
7c06a3 |
+++ b/quotacheck.c
|
|
|
7c06a3 |
@@ -880,12 +880,12 @@ static int sub_quota_file(struct mount_entry *mnt, int qtype, int ftype)
|
|
|
7c06a3 |
|
|
|
7c06a3 |
debug(FL_DEBUG, _("Substracting space used by old %s quota file.\n"), _(type2name(ftype)));
|
|
|
7c06a3 |
if (get_qf_name(mnt, ftype, cfmt, 0, &filename) < 0) {
|
|
|
7c06a3 |
- debug(FL_VERBOSE, _("Old %s file name could not been determined. Usage will not be subtracted.\n"), _(type2name(ftype)));
|
|
|
7c06a3 |
+ debug(FL_VERBOSE | FL_DEBUG, _("Old %s file name could not been determined. Usage will not be subtracted.\n"), _(type2name(ftype)));
|
|
|
7c06a3 |
return 0;
|
|
|
7c06a3 |
}
|
|
|
7c06a3 |
|
|
|
7c06a3 |
if (stat(filename, &st) < 0) {
|
|
|
7c06a3 |
- debug(FL_VERBOSE, _("Cannot stat old %s quota file %s: %s. Usage will not be subtracted.\n"), _(type2name(ftype)), filename, strerror(errno));
|
|
|
7c06a3 |
+ debug(FL_VERBOSE | FL_DEBUG, _("Cannot stat old %s quota file %s: %s. Usage will not be subtracted.\n"), _(type2name(ftype)), filename, strerror(errno));
|
|
|
7c06a3 |
free(filename);
|
|
|
7c06a3 |
return 0;
|
|
|
7c06a3 |
}
|
|
|
7c06a3 |
@@ -961,7 +961,7 @@ Please stop all programs writing to filesystem or use -m flag to force checking.
|
|
|
7c06a3 |
debug(FL_DEBUG, _("Filesystem remounted read-only\n"));
|
|
|
7c06a3 |
}
|
|
|
7c06a3 |
start_scan:
|
|
|
7c06a3 |
- debug(FL_VERBOSE, _("Scanning %s [%s] "), mnt->me_devname, mnt->me_dir);
|
|
|
7c06a3 |
+ debug(FL_VERBOSE | FL_DEBUG, _("Scanning %s [%s] "), mnt->me_devname, mnt->me_dir);
|
|
|
7c06a3 |
#if defined(EXT2_DIRECT)
|
|
|
7c06a3 |
if (!strcmp(mnt->me_type, MNTTYPE_EXT2) || !strcmp(mnt->me_type, MNTTYPE_EXT3) || !strcmp(mnt->me_type, MNTTYPE_NEXT3)) {
|
|
|
7c06a3 |
if ((failed = ext2_direct_scan(mnt->me_devname)) < 0)
|
|
|
7c06a3 |
@@ -977,7 +977,7 @@ start_scan:
|
|
|
7c06a3 |
goto out;
|
|
|
7c06a3 |
}
|
|
|
7c06a3 |
dirs_done++;
|
|
|
7c06a3 |
- if (flags & FL_VERBOSE || flags & FL_VERYVERBOSE)
|
|
|
7c06a3 |
+ if (flags & FL_VERBOSE || flags & FL_DEBUG)
|
|
|
7c06a3 |
fputs(_("done\n"), stdout);
|
|
|
7c06a3 |
if (ucheck) {
|
|
|
7c06a3 |
failed |= sub_quota_file(mnt, USRQUOTA, USRQUOTA);
|
|
|
7c06a3 |
@@ -1171,7 +1171,7 @@ static int check_all(void)
|
|
|
7c06a3 |
debug(FL_DEBUG, _("Detected quota format %s\n"), fmt2name(cfmt));
|
|
|
7c06a3 |
}
|
|
|
7c06a3 |
|
|
|
7c06a3 |
- if (flags & FL_VERBOSE &&
|
|
|
7c06a3 |
+ if (flags & (FL_VERBOSE | FL_DEBUG) &&
|
|
|
7c06a3 |
!str_hasmntopt(mnt->me_opts, MNTOPT_USRJQUOTA) &&
|
|
|
7c06a3 |
!str_hasmntopt(mnt->me_opts, MNTOPT_GRPJQUOTA) &&
|
|
|
7c06a3 |
!warned &&
|
|
|
7c06a3 |
--
|
|
|
7c06a3 |
1.8.1.2
|
|
|
7c06a3 |
|