[Glibc-bsd-devel] Fix for "fsck.ufs -a" problem

Robert Millan zeratul2@wanadoo.es
Sun, 9 May 2004 03:58:30 +0200


Hi!

As told on IRC, I found the problem with "fsck.ufs -a" error on startup.

>From e2fsprogs' fsck manpage:

       -a     Automatically repair the file system without any questions  (use
              this  option with caution).  Note that e2fsck(8) supports -a for
              backwards compatibility only.  This option is mapped to e2fsck's
              -p  option  which is safe to use, unlike the -a option that some
              file system checkers support.

The problem can be simply fixed by having fsck.ufs accept -a just like most
fsck.* do. And -a means the same as -p (preen mode), so:

--- ufsutils/fsck.ufs/main.c~        2003-12-27 03:39:59.000000000 +0100
+++ ufsutils/fsck.ufs/main.c 2004-05-09 04:35:23.000000000 +0200
@@ -142,6 +142,7 @@
                        yflag = 0;
                        break;
  
+               case 'a':
                case 'p':
                        preen++;
                        break;

That's all. Could you apply this and upload it to gnuab archive?

-- 
Robert Millan

"[..] but the delight and pride of Aule is in the deed of making, and in the
thing made, and neither in possession nor in his own mastery; wherefore he
gives and hoards not, and is free from care, passing ever on to some new work."

 -- J.R.R.T., Ainulindale (Silmarillion)