]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
nvme-print: sanitize supported-log-pages output
authorMartin George <marting@netapp.com>
Wed, 22 Mar 2023 06:36:55 +0000 (12:06 +0530)
committerDaniel Wagner <wagi@monom.org>
Wed, 22 Mar 2023 14:31:19 +0000 (15:31 +0100)
commit85a22ba40fdb100616885b7c757a2a6bdbde3d03
tree1f4aab25771143e8ba6aa4567eda4a299631bdd3
parent16cfd09d71ffb5f172b51f3690d1b64ece3d2a33
nvme-print: sanitize supported-log-pages output

The current nvme supported-log-pages output is a little cryptic
as seen below:

Support Log Pages Details for nvme1n1:
LID 0x0 (Supported Log Pages), supports 0x3

LID 0x1 (Error Information), supports 0x3
...

So sanitize this output to make it more meaningful with better
formatting. This should apply to the verbose output as well.
With these changes, the sanitized normal output should show up
as follows:

Support Log Pages Details for nvme1n1:
LID 0x0 - Supported Log Pages
LID 0x1 - Error Information
...

And the sanitized verbose output would show up as:

Support Log Pages Details for nvme1n1:
LID 0x0 - Supported Log Pages
  LSUPP is supported
  IOS is supported
LID 0x1 - Error Information
  LSUPP is supported
  IOS is supported
...

Signed-off-by: Martin George <marting@netapp.com>
nvme-print.c