sbin/newfs_hammer2: Add newfs(8) -s option equivalent option
commit6dd9109578df96d3d65713214349a80090c194bc
authorTomohiro Kusumi <tkusumi@netbsd.org>
Mon, 6 Mar 2023 08:48:04 +0000 (6 00:48 -0800)
committerTomohiro Kusumi <tkusumi@netbsd.org>
Tue, 7 Mar 2023 16:34:12 +0000 (7 08:34 -0800)
tree354c3252d8338b502bdf4836ca089d443448084d
parent9be1b0c77afd935ea1e16400d86ee504c084ff74
sbin/newfs_hammer2: Add newfs(8) -s option equivalent option

Very useful for testing, file backed volume, etc.
The difference vs newfs(8) is newfs_hammer2(8) takes filesystem
size in bytes, using the same format as -b or -r options.

The volume size is deducted from the value (in argv[i] order,
where argc is number of volumes), and if the value reaches zero
while there are remaining volumes, the program fails.

Since -s option requires 1GiB (level1 size) or larger,
the failure mentioned above happens only for multi-volumes.
sbin/newfs_hammer2/mkfs_hammer2.c
sbin/newfs_hammer2/mkfs_hammer2.h
sbin/newfs_hammer2/newfs_hammer2.8
sbin/newfs_hammer2/newfs_hammer2.c