sbin/hammer: Drop non inode case from get_leaf_crc()
commit965831f00101c453961f35a735fc5331fc4187c0
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Fri, 14 Apr 2017 17:12:54 +0000 (14 20:12 +0300)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Fri, 14 Apr 2017 19:07:40 +0000 (14 22:07 +0300)
treebb53500a597a0f6400acdaca2169feff2676f3a8
parent51b976e85e7c01586027ceec552075742571885e
sbin/hammer: Drop non inode case from get_leaf_crc()

The default case in get_leaf_crc() added by 4c09d9c4 is unused
(it's repeating the same switch/cases done by its caller), but this
is also wrong for userspace where a malloc'd buffer can only be upto
16KiB regardless of what leaf elm says.

It can be guaranteed for inode since we know inode is smaller than
16KiB. It can also be guaranteed for other types of metadata too,
but those can simply use get_buf_crc() and in fact they do.

Also see 7d0dab48.
sbin/hammer/cmd_show.c