sbin/hammer: Make hammer commands print root volume path
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 2 Apr 2016 23:34:44 +0000 (08:34 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sun, 3 Apr 2016 03:29:47 +0000 (12:29 +0900)
commit56c2f4d6da955cde55e4173bc954e7fe7244013e
tree4e08c16aa085a1edac90521b97bed31cd10edb40
parentea32fae4e76648969a69cc4eb674d70f9240998a
sbin/hammer: Make hammer commands print root volume path

Base on the change made by the previous commit, this commit adds
the root volume path information (not root volume#) to hammer info
and hammer volume-list commands. hammer volume-list shows the path
only on -v. This enables users to explicitly know the root volume.

 [A] The existing /sbin/hammer
 # hammer -v volume-list /HAMMER
 /dev/da1
 /dev/da2
 /dev/da3
 # hammer info /HAMMER | grep Root
         Root Volume         0

 [B] With this commit
 # ./hammer -v volume-list /HAMMER
 0       /dev/da1 (Root Volume)
 1       /dev/da2
 2       /dev/da3
 # hammer info /HAMMER | grep Root
         Root Volume         /dev/da1
sbin/hammer/cmd_info.c
sbin/hammer/cmd_volume.c
sbin/hammer/hammer.8
sbin/hammer/hammer.c
sbin/hammer/hammer.h
sbin/hammer/misc.c