summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorsbruno <sbruno@FreeBSD.org>2015-10-13 17:00:14 +0000
committersbruno <sbruno@FreeBSD.org>2015-10-13 17:00:14 +0000
commit6b8afc4e2b5c35d7f6080e8ead032b3f4891542b (patch)
tree029d7299645a92608f2c74a3542444417ee65d8a /usr.sbin
parentc01ec408f6eded3e537fa162d82f9571d38d8ba0 (diff)
downloadFreeBSD-src-6b8afc4e2b5c35d7f6080e8ead032b3f4891542b.zip
FreeBSD-src-6b8afc4e2b5c35d7f6080e8ead032b3f4891542b.tar.gz
makefs(8) leaves sblock.fs_providersize uninitialized (zero) that can be easily
checked with dumpfs(8). This may lead to other problems, f.e. geom_label kernel module sanity checks do not like zero fs_old_size value and skips such UFS1 file system while tasting (fs_old_size derives from sblock.fs_providersize). PR: 203704 Submitted by: eugen@grosbein.net Reviewed by: marcel
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/makefs/ffs/mkfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/makefs/ffs/mkfs.c b/usr.sbin/makefs/ffs/mkfs.c
index 274d1c2..b1bdd09 100644
--- a/usr.sbin/makefs/ffs/mkfs.c
+++ b/usr.sbin/makefs/ffs/mkfs.c
@@ -248,7 +248,8 @@ ffs_mkfs(const char *fsys, const fsinfo_t *fsopts)
exit(21);
}
sblock.fs_fsbtodb = ilog2(sblock.fs_fsize / sectorsize);
- sblock.fs_size = fssize = dbtofsb(&sblock, fssize);
+ sblock.fs_size = sblock.fs_providersize = fssize =
+ dbtofsb(&sblock, fssize);
if (Oflag <= 1) {
sblock.fs_magic = FS_UFS1_MAGIC;
OpenPOWER on IntegriCloud