[syslinux:master] Added PCI desc

syslinux-bot for Marcel Ritter unrzl1 at linux.rrze.uni-erlangen.de
Mon Jul 5 14:27:22 PDT 2010


Commit-ID:  6841745fa86a45405de9bdd0e453f4abb26398b7
Gitweb:     http://syslinux.zytor.com/commit/6841745fa86a45405de9bdd0e453f4abb26398b7
Author:     Marcel Ritter <unrzl1 at linux.rrze.uni-erlangen.de>
AuthorDate: Tue, 20 Oct 2009 14:49:13 +0200
Committer:  Marcel Ritter <unrzl1 at linux.rrze.uni-erlangen.de>
CommitDate: Tue, 20 Oct 2009 14:49:13 +0200

Added PCI desc



---
 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 6189726..7159306 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



More information about the Syslinux-commits mailing list