diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-12-15 23:54:39 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-12-15 23:54:39 +0000 |
commit | 795cbb9daaaccff2e81422fa266e095767d8e5f8 (patch) | |
tree | 7ce0b5ab7ff28e5059893512d1aa82245be4521f /convert/xf86PciInfo2pcitable.c | |
parent | 96db78ac384ac0119eadea1f296567a34912f592 (diff) | |
download | ldetect-lst-795cbb9daaaccff2e81422fa266e095767d8e5f8.tar ldetect-lst-795cbb9daaaccff2e81422fa266e095767d8e5f8.tar.gz ldetect-lst-795cbb9daaaccff2e81422fa266e095767d8e5f8.tar.bz2 ldetect-lst-795cbb9daaaccff2e81422fa266e095767d8e5f8.tar.xz ldetect-lst-795cbb9daaaccff2e81422fa266e095767d8e5f8.zip |
move to convert directory the convert tools
Diffstat (limited to 'convert/xf86PciInfo2pcitable.c')
-rw-r--r-- | convert/xf86PciInfo2pcitable.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/convert/xf86PciInfo2pcitable.c b/convert/xf86PciInfo2pcitable.c new file mode 100644 index 00000000..30374b79 --- /dev/null +++ b/convert/xf86PciInfo2pcitable.c @@ -0,0 +1,22 @@ +/* take xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h in XFree86-4 */ +#include "xf86PciInfo.h" + +const char *vendor2text(int id) { + SymTabRec *p; + for (p = xf86PCIVendorNameInfoData; p->token; p++) + if (p->token == id) return p->name; + fprintf(stderr, "error, bad vendor id\n"); + exit(1); +} + +main() { + pciVendorDeviceInfo *p; + + for (p = xf86PCIVendorInfoData; p->VendorID; p++) { + struct pciDevice *q; + const char *vendor = vendor2text(p->VendorID); + for (q = p->Device; q->DeviceID; q++) { + printf("0x%04x\t0x%04x\t\"unknown\"\t\"%s|%s\"\n", p->VendorID, q->DeviceID, vendor, q->DeviceName); + } + } +} |