summaryrefslogtreecommitdiff
path: root/sbin/fsck_ffs/preen.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-05-01 15:14:44 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-05-01 15:14:44 +0000
commitec3303bbdebc933d14bcc5b1c50c5a501cad65e2 (patch)
treeda4fee5f34d4021fa6045d6017e4d95471b19fc8 /sbin/fsck_ffs/preen.c
parent0da2670630313f6f722a97dae6ba8443890bdf85 (diff)
(once again) allow /etc/fstab mountpoints to be used, ie "fsck /usr"
Diffstat (limited to 'sbin/fsck_ffs/preen.c')
-rw-r--r--sbin/fsck_ffs/preen.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sbin/fsck_ffs/preen.c b/sbin/fsck_ffs/preen.c
index d347cd3f1de..ce0b18338df 100644
--- a/sbin/fsck_ffs/preen.c
+++ b/sbin/fsck_ffs/preen.c
@@ -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);
}