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>
Sat, 5 Mar 2016 09:43:57 +0000 (18:43 +0900)
commit337ec5f8a0e7641024a16c9b647ca804d753334f
tree02611f89f910f30f9714ddee6b3399716837d015
parent196153860dcc905a1f800813359c86d79029b4e7
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.
sbin/hammer/cmd_show.c
sbin/hammer/hammer.c
sbin/hammer/hammer.h