From af0dee84955c6e8bdbc1d640283ca8e63e903881 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 25 Mar 1999 07:44:33 +0000 Subject: 1999-03-25 Roland McGrath * setup.c (setup): Don't complain if the device is a block device. --- ufs-fsck/setup.c | 19 ++++++++----------- 1 file 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; } - - - -- cgit v1.2.3