tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

doubly verbose (-vv) option for quotacheck(8)



I don't know whether this is useful for anybody else, but for debugging
purposes, I implemeted a -vv option for quotacheck(8) to list details of
every cylinder group and inode being processed.
I made debugging output go to stderr, not stdout, since all other output
was going there, too.
I'm not sure whether my blank-padding of ino, gid and uid appeals to everyone.
--- quotacheck-nvv.c    2008-10-21 14:26:35.000000000 +0200
+++ quotacheck-n.c      2008-10-21 11:03:10.000000000 +0200
@@ -429,8 +429,6 @@
                } else
 #endif
                        inosused = sblock.fs_ipg;
-               if (vflag >= 2)
-                       fprintf(stderr, "cg %d: %d inodes\n", cg, inosused);
                for (i = 0; i < inosused; i++, ino++) {
                        if (got_siginfo) {
                                fprintf(stderr,
@@ -445,8 +443,6 @@
                                continue;
                        if ((mode = DIP(dp, mode) & IFMT) == 0)
                                continue;
-                       if (vflag >= 2)
-                               fprintf(stderr, "ino %8ld: mode=0%06o, gid=%5d, 
uid=%5d, blocks=%ld\n", (long)ino, DIP(dp, mode) & IFMT, DIP(dp, gid), DIP(dp, 
uid), DIP(dp, blocks));
                        if (qnp->flags & HASGRP) {
                                fup = addid(DIP(dp, gid), GRPQUOTA,
                                    (char *)0);
--- quotacheck-nvv.8    2008-10-21 11:36:32.000000000 +0200
+++ quotacheck-n.8      2008-10-21 11:35:49.000000000 +0200
@@ -107,12 +107,6 @@
 is more verbose,
 and reports corrected discrepancies between the
 calculated and recorded disk quotas.
-Specifying
-.Fl v
-twice makes
-.Nm
-even more verbose, reporting a summary of every
-inode being processed. This can produce vast amounts of output.
 .It Fl n
 .Nm
 updates neither the quota file nor the current system copy


Home | Main Index | Thread Index | Old Index