usr.sbin/makefs: Add offline HAMMER2IOC_VERSION_GET support
commitf72350ac2762960e589952de2b21170272d29814
authorTomohiro Kusumi <tkusumi@netbsd.org>
Thu, 15 Jun 2023 07:28:07 +0000 (15 00:28 -0700)
committerTomohiro Kusumi <tkusumi@netbsd.org>
Thu, 15 Jun 2023 07:38:52 +0000 (15 00:38 -0700)
tree9be6a9f06135afbb809f2d73f79bcd28fa569a5b
parent9a14965130cd1ea8613b898c3edd9c5ed63ff3dd
usr.sbin/makefs: Add offline HAMMER2IOC_VERSION_GET support

The offline version get uses existing "-o V" option with no argument.
`image-file` argument is a valid HAMMER2 image file or block device.
`directory` argument is unused, but needs to be a valid path or "--".

e.g.
$ makefs -t hammer2 -o V /dev/adx --
$ makefs -t hammer2 -o V /path/to/hammer2.img --

There is no hammer2(8) directive for this as it's internally used.
usr.sbin/makefs/hammer2.c
usr.sbin/makefs/hammer2/hammer2.h
usr.sbin/makefs/hammer2/hammer2_ioctl.c
usr.sbin/makefs/makefs.8