X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=inline;f=lib%2Fsysfs.c;h=ffa4f9d63d34916fe91945b0e83040049d95c564;hb=4582426202ad6ac6539305dae2c0b70016f014f4;hp=735c14445ab8992ce9878820ba7c0bb394e5047b;hpb=e9e7fab13d16067658f02d47094a949f56aef596;p=pciutils.git diff --git a/lib/sysfs.c b/lib/sysfs.c index 735c144..ffa4f9d 100644 --- a/lib/sysfs.c +++ b/lib/sysfs.c @@ -461,6 +461,20 @@ sysfs_fill_info(struct pci_dev *d, unsigned int flags) } } + if (want_fill(d, flags, PCI_FILL_DRIVER)) + { + char *driver_path = sysfs_deref_link(d, "driver"); + if (driver_path) + { + char *driver = strrchr(driver_path, '/'); + driver = driver ? driver+1 : driver_path; + pci_set_property(d, PCI_FILL_DRIVER, driver); + free(driver_path); + } + else + clear_fill(d, PCI_FILL_DRIVER); + } + pci_generic_fill_info(d, flags); }