git: sbin/hammer: Make get_node() a wrapper over get_buffer_data()

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Thu Oct 6 14:28:54 PDT 2016


commit 38f16a2db7941071123ee36370ebf6b74503a0c1
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Mon Sep 26 07:20:44 2016 +0900

    sbin/hammer: Make get_node() a wrapper over get_buffer_data()
    
    get_node() which is only used by hammer show/blockmap commands should
    be a wrapper over the existing get_buffer_data().
    
    It needs to do rel_buffer() if the given offset is out of range when
    *bufferp is non NULL. Adding this check makes this function equivalent
    of get_buffer_data() with 0 for isnew. isnew must be 0 because this
    function assumes and only works when the B-Tree node already exists.
    
    This doesn't change anything because hammer show/blockmap always give
    NULL for *bufferp, but it should still be changed.

Summary of changes:
 sbin/hammer/ondisk.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/38f16a2db7941071123ee36370ebf6b74503a0c1


-- 
DragonFly BSD source repository



More information about the Commits mailing list