sbin/mount_hammer: Fix/cleanup test_volumes()
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Thu, 3 Nov 2016 14:37:09 +0000 (23:37 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Thu, 3 Nov 2016 15:30:11 +0000 (00:30 +0900)
commit1e297b34baab956c09003283b8b8b6900bd6cbdf
treead6bbe7a328d68dbb1c342a6bac757692686d26c
parent920e34fae0e0b04c5f16eb0e9ebf62d0ad3c2491
sbin/mount_hammer: Fix/cleanup test_volumes()

The requirement of this function is basically the same as
__verify_volume() in sbin/hammer/ondisk.c, so make it
__verify_volume() based.

Note that this function doesn't necessarily print the real
reason mount(2) failed, as shown in a comment. This function
just takes a wild guess with sanity checks on volume header.
The real reason is likely to be in dmesg. This originally
didn't exist, but was added by 1a607e3e in 2009.
sbin/mount_hammer/mount_hammer.c