sbin/hammer: Make get_node() a wrapper over get_buffer_data()
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sun, 25 Sep 2016 22:20:44 +0000 (07:20 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Thu, 6 Oct 2016 20:17:35 +0000 (05:17 +0900)
commit38f16a2db7941071123ee36370ebf6b74503a0c1
treed8188e0dbaa87420deaf6cd691d787eee13ba422
parent23c84b8f4614206c0e0e214531fc216fbf3854c9
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.
sbin/hammer/ondisk.c