sbin/hammer: Add obfuscate option to hammer show
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 5 Mar 2016 05:44:21 +0000 (14:44 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sun, 20 Mar 2016 14:36:32 +0000 (23:36 +0900)
commitb4143b6fe697f860d71b28c04f7ae82529411609
tree1bd1632b45e7ada90496bfa2f8fa44188da984f4
parentd30b24e65b830560fa2874bb2919caca2725abee
sbin/hammer: Add obfuscate option to hammer show

Add an option not to print directory entry name so that users
can send hammer show output to someone else if necessary
without making public their name. Most users never use hammer
show, but some users do and see errors in it.

By default hammer show printfs directory entry name like
 dir-entry ino=00000001007a933b lo=00000000 name="hammer.c"
but by using this option it would be like
 dir-entry ino=00000001007a933b lo=00000000

Note that hammer show command is a subcommand of /sbin/hammer,
so this option is not a part of getopt(3) options. It needs
to be used as follows if one does not need to filter btree.
 # hammer -f /dev/da1:/dev/da2:/dev/da3 show none none obfuscate

Also note that this option is not written in hammer(8) manpage
just like filter/nofilter option is not written.

(cherry picked from commit 337ec5f8a0e7641024a16c9b647ca804d753334f)
sbin/hammer/cmd_show.c
sbin/hammer/hammer.c
sbin/hammer/hammer.h