diff options
author | Marcel Ritter <unrzl1@linux.rrze.uni-erlangen.de> | 2009-10-20 14:49:13 +0200 |
---|---|---|
committer | Marcel Ritter <unrzl1@linux.rrze.uni-erlangen.de> | 2009-10-20 14:49:13 +0200 |
commit | 6841745fa86a45405de9bdd0e453f4abb26398b7 (patch) | |
tree | 1eb9df16712db1ccc50481d2e780b0cb4bf923a0 | |
parent | 3d0f9df1a36f64ef79c5011366c3b34ad356bc1c (diff) | |
download | syslinux-6841745fa86a45405de9bdd0e453f4abb26398b7.tar.gz |
Added PCI desc
-rw-r--r-- | com32/lua/doc/syslinux.asc | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/com32/lua/doc/syslinux.asc b/com32/lua/doc/syslinux.asc index 61897266..71593066 100644 --- a/com32/lua/doc/syslinux.asc +++ b/com32/lua/doc/syslinux.asc @@ -152,7 +152,49 @@ PCI .pci_getinfo() -.pci_getidlist() +Return list of value pairs (device_index, device) of all PCI devices. + +.pci_getidlist(filename) + +Load a tab separated list of PCI IDs and their description. +Sample files can be found here: http://pciids.sourceforge.net/ + + +_Example_: +...................................................... +-- get nice output +printf = function(s,...) + return io.write(s:format(...)) + end + +-- get device info +pciinfo = pci.getinfo() + +-- get plain text device description +pciids = pci.getidlist("/pci.ids") + +-- list all pci busses +for dind,device in pairs(pciinfo) do + + -- search for device description + search = string.format("%04x%04x", device['vendor'], device['product']) + + printf(" %04x:%04x:%04x:%04x = ", device['vendor'], device['product'], + device['sub_vendor'], device['sub_product']) + + if ( pciids[search] ) then + printf("%s\n", pciids[search]) + else + printf("Unknown\n") + end +end + +-- print(pciids["8086"]) +-- print(pciids["10543009"]) +-- print(pciids["00700003"]) +-- print(pciids["0070e817"]) +-- print(pciids["1002437a1002437a"]) +...................................................... VESA |