summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_ifs
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/fsck_ifs')
-rw-r--r--sbin/fsck_ifs/setup.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sbin/fsck_ifs/setup.c b/sbin/fsck_ifs/setup.c
index bec9a31..197d9cc 100644
--- a/sbin/fsck_ifs/setup.c
+++ b/sbin/fsck_ifs/setup.c
@@ -461,6 +461,11 @@ calcsb(dev, devfd, fs)
fstypenames[pp->p_fstype] : "unknown");
return (0);
}
+ if (pp->p_fsize == 0 || pp->p_frag == 0) {
+ pfatal("%s: LABELED AS A %s FILE SYSTEM, BUT BLOCK SIZE IS 0\n",
+ dev, fstypenames[pp->p_fstype]);
+ return (0);
+ }
memset(fs, 0, sizeof(struct fs));
fs->fs_fsize = pp->p_fsize;
fs->fs_frag = pp->p_frag;
OpenPOWER on IntegriCloud