git://git.onelab.eu
/
pypcilib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2702216
)
Don't return ata_generic or eepro100 if other drivers are available.
author
Daniel Hokka Zakrisson
<dhokka@cs.princeton.edu>
Thu, 6 Dec 2007 17:11:34 +0000
(17:11 +0000)
committer
Daniel Hokka Zakrisson
<dhokka@cs.princeton.edu>
Thu, 6 Dec 2007 17:11:34 +0000
(17:11 +0000)
pypcimap.py
patch
|
blob
|
history
diff --git
a/pypcimap.py
b/pypcimap.py
index
9160cc0
..
ba7f9f6
100644
(file)
--- a/
pypcimap.py
+++ b/
pypcimap.py
@@
-36,6
+36,9
@@
import os
import re
+# These are modules which are only returned if no other driver is available
+greylist = ["ata_generic", "eepro100"]
+
class PCIMap:
"""Encapsulates modules.pcimap"""
def __init__(self, filename):
@@
-51,6
+54,9
@@
class PCIMap:
(i[4] == tuple[3] or i[4] == 0xffffffff) and
(i[5] == (tuple[4] & i[6]))):
ret.append(i[0])
+ for i in greylist:
+ if i in ret and len(ret) > 1:
+ ret.remove(i)
return ret
def add(self, list):
# FIXME: check values