Source-Changes-HG archive

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

[src/trunk]: src/sbin/fsck_ffs Do Skip device checks, which ends up parsing f...



details:   https://anonhg.NetBSD.org/src/rev/1bd007434503
branches:  trunk
changeset: 761725:1bd007434503
user:      njoly <njoly%NetBSD.org@localhost>
date:      Sun Feb 06 12:02:59 2011 +0000

description:
Do Skip device checks, which ends up parsing fstab, when working on a
filesystem image with -F option set.

diffstat:

 sbin/fsck_ffs/main.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r 2bb2bf4e873c -r 1bd007434503 sbin/fsck_ffs/main.c
--- a/sbin/fsck_ffs/main.c      Sun Feb 06 06:47:15 2011 +0000
+++ b/sbin/fsck_ffs/main.c      Sun Feb 06 12:02:59 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.76 2010/04/11 08:23:51 hannken Exp $        */
+/*     $NetBSD: main.c,v 1.77 2011/02/06 12:02:59 njoly Exp $  */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.6 (Berkeley) 5/14/95";
 #else
-__RCSID("$NetBSD: main.c,v 1.76 2010/04/11 08:23:51 hannken Exp $");
+__RCSID("$NetBSD: main.c,v 1.77 2011/02/06 12:02:59 njoly Exp $");
 #endif
 #endif /* not lint */
 
@@ -216,7 +216,12 @@
 
        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