From 3f718154f60cb6ad73fa0f81b0181dd4e0fb72b8 Mon Sep 17 00:00:00 2001 From: Erik Troan Date: Mon, 19 Jul 1999 02:02:22 +0000 Subject: don't report module names w/ .o attached --- isys/pci/pciprobe.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/isys/pci/pciprobe.c b/isys/pci/pciprobe.c index 306e8c9cf..c554dd024 100644 --- a/isys/pci/pciprobe.c +++ b/isys/pci/pciprobe.c @@ -61,7 +61,7 @@ int probePciReadDrivers(const char * fn) { struct stat sb; char * buf; int numDrivers; - char * start; + char * start, * chptr; struct pciDevice * nextDevice; char module[5000]; char descrip[5000]; @@ -94,6 +94,9 @@ int probePciReadDrivers(const char * fn) { if (sscanf(start, "%x %x %s \"%[^\"]", &nextDevice->vendor, &nextDevice->device, module, descrip ) == 4) { numPciDevices++; + chptr = strchr(module, '.'); + if (chptr) *chptr = '\0'; + nextDevice->driver = strdup(module); nextDevice->desc = strdup(descrip); nextDevice++; -- cgit