From: Minwoo Im Date: Sat, 28 Oct 2017 18:01:52 +0000 (+0900) Subject: nvme-cli: fix wrong bitmask in number of rpmb units. X-Git-Tag: v1.5~35 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c9a9c787c5e1e068691750e9f727312d9c8a5f81;p=users%2Fsagi%2Fnvme-cli.git nvme-cli: fix wrong bitmask in number of rpmb units. Number of RPMB Units is a 3-bit field[02:00]. Bitmask should be 0111b(7h) to get this field. Signed-off-by: Minwoo Im --- diff --git a/nvme-print.c b/nvme-print.c index 9f524cdc..e79b3f48 100644 --- a/nvme-print.c +++ b/nvme-print.c @@ -218,7 +218,7 @@ static void show_nvme_id_ctrl_rpmbs(__le32 ctrl_rpmbs) __u32 tsz = (rpmbs & 0xFF0000) >> 16; __u32 rsvd = (rpmbs & 0xFFC0) >> 6; __u32 auth = (rpmbs & 0x38) >> 3; - __u32 rpmb = rpmbs & 0x3; + __u32 rpmb = rpmbs & 0x7; printf(" [31:24]: %#x\tAccess Size\n", asz); printf(" [23:16]: %#x\tTotal Size\n", tsz);