]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
nvme-print: Fix printing of u32 values
authorCaleb Sander <csander@purestorage.com>
Thu, 9 Mar 2023 16:29:06 +0000 (09:29 -0700)
committerDaniel Wagner <wagi@monom.org>
Tue, 14 Mar 2023 08:52:34 +0000 (09:52 +0100)
commit506e74e84512279d598385b407eae43e2b7c6fdd
treef125ca282dff80c72bd593db849b7679bd0ae20b
parentc5099ec4a7224940e416eebdf8c3366ade2d8b70
nvme-print: Fix printing of u32 values

Fields HMPRE, HMMIN, and NN in the Identify Controller data structure
are 32-bit unsigned values but are being printed as signed integers.
Print them using %u so large values are not displayed as negative ones.
Also make JSON uint objects use uint64 instead of int64 internally
so u32 values are stored accurately.

Signed-off-by: Caleb Sander <csander@purestorage.com>
nvme-print.c
util/json.h