diff options
| author | Bill Nottingham <notting@redhat.com> | 2005-09-09 04:52:18 +0000 |
|---|---|---|
| committer | Bill Nottingham <notting@redhat.com> | 2005-09-09 04:52:18 +0000 |
| commit | 5c90ff7b2b9e3486413d87dea2d26ff0e187a99f (patch) | |
| tree | 970d581724573564c7962475bc0397f3b1a8df06 /utils/trimpciids | |
| parent | ec4a87597dc1d0f653b2e0574d57e55dbc727ddd (diff) | |
| download | anaconda-5c90ff7b2b9e3486413d87dea2d26ff0e187a99f.tar.gz anaconda-5c90ff7b2b9e3486413d87dea2d26ff0e187a99f.tar.xz anaconda-5c90ff7b2b9e3486413d87dea2d26ff0e187a99f.zip | |
* anaconda.spec: Bump version, tweak requirements
* installclass.py (setVideoCard, configureX): Adapt to new rhpl
X setup code
* kickstart.py (doXConfig): Likewise
* kickstartData.py (__init__): Likewise
* kickstartParser.py (doXConfig): Likewise
* packages.py (writeXConfiguration): Likewise
* xsetup.py (getArgList): Likewise
* scripts/mk-images: Remove modules.pcimap, modules.usbmap,
pcitable, from images, and associated trimmer scripts from
files used. Add modules.alias, videoaliases. Trim modules.alias
using trimmodalias.
* scripts/upd-instroot: Don't keep Cards, but keep videoaliases.
Don't run checkcards.py
* utils/trimmodalias: New script, trim modules.alias file to
match modules in the first/second stage
* utils/trimpciids: Trim pci.ids based on modules.alias and
videoaliases, not pcitable and modules.pcimap
* utils/checkcards.py: Remove now obsolete script
* utils/trimmodmap: Likewise
* utils/trimpcitable: Likewise
* utils/trimusbmap: Likewise
Diffstat (limited to 'utils/trimpciids')
| -rwxr-xr-x | utils/trimpciids | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/utils/trimpciids b/utils/trimpciids index 3274dc2cf..2d177acc7 100755 --- a/utils/trimpciids +++ b/utils/trimpciids @@ -12,27 +12,28 @@ if f: pcitable = f.readlines() f.close() for line in pcitable: - if not line.startswith("0x"): + if not line.startswith("alias pci:"): continue - fields = line.split('\t') - if fields[0] not in vendors: - vendors.append(fields[0]) - if (fields[0], fields[1]) not in devices: - devices.append( (fields[0],fields[1])) + vend = "0x%s" % (line[15:19],) + dev = "0x%s" % (line[24:28],) + if vend not in vendors: + vendors.append(vend) + if (vend, dev) not in devices: + devices.append( (vend, dev) ) + f = open(sys.argv[2]) if f: - pcimap = f.readlines() + pcitable = f.readlines() f.close() - for line in pcimap: - if line.startswith("#"): + for line in pcitable: + if not line.startswith("alias pcivideo:"): continue - ( trash, vend, dev, trash, trash, trash , trash, trash ) = line.split() - vend = vend.replace("0x0000","0x",1) - dev = dev.replace("0x0000","0x",1) + vend = "0x%s" % (line[20:24],) + dev = "0x%s" % (line[29:33],) if vend not in vendors: vendors.append(vend) - if (vend,dev) not in devices: - devices.append( (vend, dev)) + if (vend, dev) not in devices: + devices.append( (vend, dev) ) pciids = sys.stdin.readlines() current_vend = 0 |
