tech-userlevel archive

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

Re: fsck_ffs: skip block/character device check with -F option



On Fri, Feb 04, 2011 at 12:06:10AM +0100, Nicolas Joly wrote:
> 
> The attached patch make fsck_ffs skip block/character device checks
> when -F option is given indicating that an filesystem image is
> provided. In that case, checking fstab content seems just wrong.

Oops, here is the patch.

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.
Index: sbin/fsck_ffs/main.c
===================================================================
RCS file: /cvsroot/src/sbin/fsck_ffs/main.c,v
retrieving revision 1.76
diff -u -p -r1.76 main.c
--- sbin/fsck_ffs/main.c        11 Apr 2010 08:23:51 -0000      1.76
+++ sbin/fsck_ffs/main.c        3 Feb 2011 22:51:30 -0000
@@ -216,7 +216,12 @@ main(int argc, char *argv[])
 
        while (argc-- > 0) {
                int nret;
-               char *path = strdup(blockcheck(*argv));
+               char *path;
+
+               if (!forceimage)
+                       path = strdup(blockcheck(*argv));
+               else
+                       path = strdup(*argv);
 
                if (path == NULL)
                        pfatal("Can't check %s\n", *argv);


Home | Main Index | Thread Index | Old Index