sbin/hammer: Add filter mode when lo:objid directive is used

Operating Systems / DragonFlyBSD - Tomohiro Kusumi [gmail.com] - 21 March 2015 08:55 UTC

- This commit is expansion to the commit e7f926a5 and edcc8136. These commits make hammer show command search and print btree elements that match lo:objid using '*' mark, but go back to normal iteration once it hits matched elements. This commit gives options to the way it filters unmatched elements.

- Using the arg "filter" after the directive makes it continue filtering without going back to normal iteration. This makes it only show nodes that have matched elements.

- Using the arg "nofilter" after the directive makes it not to filter from the beginning (same as when lo:objid directive is not specified except that this does print '*' for those that match lo:objid).

- Not specifying any arg after the directive works the same as it did before.

c6121c9 sbin/hammer: Add filter mode when lo:objid directive is used
sbin/hammer/cmd_show.c | 13 +++++++------
sbin/hammer/hammer.c | 9 ++++++++-
sbin/hammer/hammer.h | 2 +-
3 files changed, 16 insertions(+), 8 deletions(-)

Upstream: gitweb.dragonflybsd.org


  • Share