Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
S
scom
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
SulinOS
scom
Commits
55f8ffd9
Kaydet (Commit)
55f8ffd9
authored
Mar 20, 2009
tarafından
Fatih Aşıcı
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove modaliasMatch. I won't use it.
üst
38588ff9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
35 deletions
+0
-35
probe.py
zorg/zorg/probe.py
+0
-35
No files found.
zorg/zorg/probe.py
Dosyayı görüntüle @
55f8ffd9
...
...
@@ -2,9 +2,7 @@
import
os
import
dbus
import
glob
import
struct
import
fnmatch
from
zorg
import
consts
from
zorg.parser
import
*
...
...
@@ -348,36 +346,3 @@ def XProbe(dev):
return
return
file
(
"/var/log/xlog"
)
.
readlines
()
def
modaliasMatch
(
modaliasFile
,
pciId
=
None
):
class
MatchedDevice
:
def
__init__
(
self
):
self
.
modalias
=
None
self
.
sys_path
=
None
self
.
alias_file
=
None
self
.
driver
=
None
aliaslist
=
tuple
(
line
.
split
()[
1
:]
for
line
in
loadFile
(
modaliasFile
)
if
not
line
.
startswith
(
"#"
))
# If PCI ID is given, check it only.
if
pciId
:
modalias_list
=
[
"/sys/bus/pci/devices/
%
s/modalias"
%
pciId
]
else
:
modalias_list
=
glob
.
glob
(
"/sys/bus/*/devices/*/modalias"
)
for
modalias
in
modalias_list
:
try
:
alias
=
open
(
modalias
)
.
read
()
.
strip
()
except
IOError
:
continue
for
pattern
,
driver
in
aliaslist
:
if
fnmatch
.
fnmatch
(
alias
,
pattern
):
match
=
MatchedDevice
()
match
.
modalias
=
alias
match
.
sys_path
=
os
.
path
.
dirname
(
modalias
)
match
.
alias_file
=
modaliasFile
match
.
driver
=
driver
return
match
return
None
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment