git: sbin/hammer: Remove test_volume()

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Sun Jul 5 10:23:01 PDT 2015


commit 887f1aaedfb834a7f2839f6e71381f2f9fd62ebc
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Sat Jul 4 23:16:46 2015 +0900

    sbin/hammer: Remove test_volume()
    
    - get_volume() and test_volume() are basically the same. The only
      difference is get_volume() calls errx() when the volume is not
      found while test_volume() returns NULL.
    
    - The caller of test_volume() calls errx() when NULL is returned,
      so test_volume() can be replaced using get_volume().
    
    - Also note that if the volume instance is not found, there is
      basically no way that the hammer userspace command can proceed
      the rest of the command (similar to losing superblock in UFS).

Summary of changes:
 sbin/hammer/hammer_util.h |  1 -
 sbin/hammer/ondisk.c      | 29 +++++++----------------------
 2 files changed, 7 insertions(+), 23 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/887f1aaedfb834a7f2839f6e71381f2f9fd62ebc


-- 
DragonFly BSD source repository



More information about the Commits mailing list