summaryrefslogtreecommitdiff
path: root/ufs-fsck
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1999-03-25 07:44:33 +0000
committerRoland McGrath <roland@gnu.org>1999-03-25 07:44:33 +0000
commit70379c15683c178a740f26a2a60e6b904cb2bb66 (patch)
tree4fdb525d3c46f5bd97c342686526d1d4eadd5087 /ufs-fsck
parentcf4dca7d198ef7f761e9f8f527343fa4b068f7d7 (diff)
1999-03-25 Roland McGrath <roland@baalperazim.frob.com>
* setup.c (setup): Don't complain if the device is a block device.
Diffstat (limited to 'ufs-fsck')
-rw-r--r--ufs-fsck/setup.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/ufs-fsck/setup.c b/ufs-fsck/setup.c
index d40cf70b..6309a901 100644
--- a/ufs-fsck/setup.c
+++ b/ufs-fsck/setup.c
@@ -1,5 +1,5 @@
-/*
- Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+/*
+ Copyright (C) 1994, 1996, 1999 Free Software Foundation, Inc.
Written by Michael I. Bushnell.
This file is part of the GNU Hurd.
@@ -51,7 +51,7 @@ setup (char *dev)
struct stat st;
int changedsb;
size_t bmapsize;
-
+
device_name = dev;
if (stat (dev, &st) == -1)
@@ -59,9 +59,9 @@ setup (char *dev)
error (0, errno, "%s", dev);
return 0;
}
- if (!S_ISCHR (st.st_mode))
+ if (!S_ISCHR (st.st_mode) && !S_ISBLK (st.st_mode))
{
- problem (1, "%s is not a character device", dev);
+ problem (1, "%s is not a character or block device", dev);
if (! reply ("CONTINUE"))
return 0;
}
@@ -88,7 +88,7 @@ setup (char *dev)
if (preen == 0)
printf ("\n");
-
+
lfdir = 0;
/* We don't do the alternate superblock stuff here (yet). */
@@ -171,10 +171,10 @@ setup (char *dev)
sblock->fs_qfmask = ~sblock->fs_fmask;
newinofmt = 0;
}
-
+
if (changedsb)
writeblock (SBLOCK, sblock, SBSIZE);
-
+
/* Constants */
maxfsblock = sblock->fs_size;
maxino = sblock->fs_ncg * sblock->fs_ipg;
@@ -189,6 +189,3 @@ setup (char *dev)
linkfound = calloc (maxino + 1, sizeof (nlink_t));
return 1;
}
-
-
-