sbin/hammer: Make info command properly handle non HAMMER path
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sun, 9 Apr 2017 16:46:20 +0000 (19:46 +0300)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sun, 9 Apr 2017 18:49:13 +0000 (21:49 +0300)
commitbabddd74dae2574824381c0bef9b80ed35dbf9df
tree040dd11bf774934aacee05bec6800719375970c0
parenta90e74c587686e9034319b2388ff5c99e7d4ac3b
sbin/hammer: Make info command properly handle non HAMMER path

This shouldn't be needed if i/f of libhammer were carefully designed,
but this seems to be the only guaranteed way to detect non HAMMER path,
and print a proper error message that makes sense for UFS, etc.

-- before this commit
 # hammer info /boot
 hammer: libhammer_get_fsinfo     <--- ???

-- with this commit
 # hammer info /boot
 hammer: /boot is probably not a HAMMER filesystem: Inappropriate ioctl for device
sbin/hammer/cmd_info.c