diff options
Diffstat (limited to 'sbin/fsck')
-rw-r--r-- | sbin/fsck/fsck.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/fsck/fsck.c b/sbin/fsck/fsck.c index 37bb64b..5a28651 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); |