diff options
author | Burt P <pburt0@gmail.com> | 2020-01-03 12:10:30 -0600 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2020-01-04 10:39:58 -0800 |
commit | f6ef98fcc1024bd715f1d12e79e63b068be2a636 (patch) | |
tree | 8a8a80db721758d5e2a70ac61f5ae79dadafb36c /hardinfo/pci_util.c | |
parent | b6810eb9fff6e06a6877076286345acb6b1564b6 (diff) |
pci_util: provide .slot_str in pci_get_device_sysfs()
Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'hardinfo/pci_util.c')
-rw-r--r-- | hardinfo/pci_util.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hardinfo/pci_util.c b/hardinfo/pci_util.c index 31870303..5f03d54a 100644 --- a/hardinfo/pci_util.c +++ b/hardinfo/pci_util.c @@ -280,6 +280,7 @@ static gboolean pci_get_device_sysfs(uint32_t dom, uint32_t bus, uint32_t dev, u s->bus = bus; s->device = dev; s->function = func; + s->slot_str = s->slot_str ? s->slot_str : pci_address_str(dom, bus, dev, func); if (! _sysfs_bus_pci_read_hex(dom, bus, dev, func, "class", &s->class) ) return FALSE; s->class >>= 8; /* TODO: find out why */ |