(once again) allow /etc/fstab mountpoints to be used, ie "fsck /usr"
authorderaadt <deraadt@openbsd.org>
Wed, 1 May 1996 15:14:43 +0000 (15:14 +0000)
committerderaadt <deraadt@openbsd.org>
Wed, 1 May 1996 15:14:43 +0000 (15:14 +0000)
sbin/fsck_ffs/preen.c

index d347cd3..ce0b183 100644 (file)
@@ -290,6 +290,7 @@ blockcheck(origname)
        char *origname;
 {
        struct stat stslash, stblock, stchar;
+       struct fstab *fsp;
        char *newname, *raw;
        int retried = 0;
 
@@ -330,6 +331,11 @@ retry:
         * Not a block or character device, just return name and
         * let the user decide whether to use it.
         */
+       if ((fsp = getfsfile(origname))) {
+           newname = fsp->fs_spec;
+           retried++;
+           goto retry;
+       }
        return (origname);
 }