]> mj.ucw.cz Git - pciutils.git/commit
lspci: Clarify unknown capability IDs
authorBjorn Helgaas <bhelgaas@google.com>
Thu, 19 Apr 2018 20:16:26 +0000 (15:16 -0500)
committerMartin Mares <mj@ucw.cz>
Fri, 20 Apr 2018 08:23:03 +0000 (10:23 +0200)
commit60a45a7ed2b738b0761dc3ca7efc608f9a774e56
tree2a8cc4df6bef3a5ac767c715bc7d630e3356b9b0
parent07e33b064abbb71f800abd909d7826f1fd93ef29
lspci: Clarify unknown capability IDs

For capabilities we don't know how to decode, we print the config address,
version, and capability ID:

  Capabilities: [220 v1] #19

This doesn't clearly identify the capability ID ("19"), whether it is a
PCI-compatible Capability ID or an Extended Capability ID (although you can
infer this by whether the address is 2 or 3 digits), or the fact that the
ID is printed in hex, which makes it hard to parse this manually.

Add a label ("Capability ID" or "Extended Capability ID") and print a "0x"
prefix so it's clear the value is in hex:

  Capabilities: [220 v1] Extended Capability ID 0x19

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
ls-caps.c
ls-ecaps.c