]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
nvme-print: Unify number base format for nsid
authorMinwoo Im <minwoo.im.dev@gmail.com>
Sun, 26 Mar 2023 11:06:49 +0000 (20:06 +0900)
committerDaniel Wagner <wagi@monom.org>
Tue, 28 Mar 2023 12:19:19 +0000 (14:19 +0200)
commit8072e231318d852d79d0f3ac0046720ecb69b4c3
treefbae6d6d5ac6559dfea459db13933257f740143a
parent3d214aca1ebff60e1cca876c7db62e1f2429646f
nvme-print: Unify number base format for nsid

`nvme list` is one of the most frequently used subcommand to list up
nvme devices in the system.  `nvme list -v` prints much more detail in
it.  But, those two commands have different number base format which are
decimal and hexadecimal without any prefix (e.g., 0x) or something.

nvme list -v shows hexadecimal nsid without `0x` which means it might be
confused between decimal and hexadecimal.  To unify this, this patch
expands device NSID fields width from 8 to 10 to cover `0x` two chracters
as a prefix for both `nvme list` and `nvme list -v`.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
nvme-print.c