aboutsummaryrefslogtreecommitdiff
path: root/sbin/fsck
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2002-10-31 15:32:39 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2002-10-31 15:32:39 +0000
commit5c63c8dd2541102b844466ffb9c8c3c329dda366 (patch)
tree4c3dd489186f85cd4dfe63c3287a97df9f9a858a /sbin/fsck
parent96d13b89c289e4a0b7fa0240a57b1c25afdeb394 (diff)
downloadsrc-5c63c8dd2541102b844466ffb9c8c3c329dda366.tar.gz
src-5c63c8dd2541102b844466ffb9c8c3c329dda366.zip
Give a meaningfull diagnostic when we cannot determine the filesystem type.
Notes
Notes: svn path=/head/; revision=106254
Diffstat (limited to 'sbin/fsck')
-rw-r--r--sbin/fsck/fsck.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/fsck/fsck.c b/sbin/fsck/fsck.c
index 37bb64bc5a2c..5a28651cf582 100644
--- a/sbin/fsck/fsck.c
+++ b/sbin/fsck/fsck.c
@@ -197,6 +197,8 @@ main(int argc, char *argv[])
(fs = getfsspec(spec)) == NULL) {
if (vfstype == NULL)
vfstype = getfslab(spec);
+ if (vfstype == NULL)
+ errx(1, "Could not determine filesystem type");
type = vfstype;
devcheck(spec);
} else {
@@ -555,7 +557,7 @@ getfslab(const char *str)
err(1, "cannot open `%s'", str);
if (ioctl(fd, DIOCGDINFO, &dl) == -1)
- err(1, "cannot get disklabel for `%s'", str);
+ return(NULL);
(void) close(fd);