summaryrefslogtreecommitdiff
path: root/ufs-fsck/setup.c
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
commitaf0dee84955c6e8bdbc1d640283ca8e63e903881 (patch)
tree5f9ea3498ec5fab766335e3782db13838bce7bcd /ufs-fsck/setup.c
parent985aa2378c033b99a3a7e08db9b4174ffd51ead5 (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/setup.c')
-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;
}
-
-
-