usr.sbin/makefs: Add HAMMER2 offline inode setcheck|setcomp support
commit465e1141fcc3778800d5284f9dcb9b8c4873a9ac
authorTomohiro Kusumi <tkusumi@netbsd.org>
Sat, 17 Jun 2023 07:26:21 +0000 (17 00:26 -0700)
committerTomohiro Kusumi <tkusumi@netbsd.org>
Sat, 17 Jun 2023 17:54:30 +0000 (17 10:54 -0700)
treed87092205b843f402a7eb65b76e562fb26e3a0c2
parentf804c4258392d77732fa77de5f610e0580ae3cf6
usr.sbin/makefs: Add HAMMER2 offline inode setcheck|setcomp support

This commit adds "setcheck" and "setcomp" commands to "-o I" option.
`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 I=setcheck:/path/to/file:sha192 /dev/adx --
$ makefs -t hammer2 -o I=setcomp:/path/to/file:zlib:6 /path/to/hammer2.img --

"setcheck" takes `:<inode_path>:<check_algo>` string after command name.
"setcomp" takes `:<inode_path>:<comp_algo>[:<comp_level>]` string
after command name. These are equivalent to hammer2(8) setcheck and
setcomp directives.
usr.sbin/makefs/hammer2.c
usr.sbin/makefs/hammer2.h
usr.sbin/makefs/hammer2/hammer2.h
usr.sbin/makefs/hammer2/hammer2_ioctl.c
usr.sbin/makefs/makefs.8