diff options
Diffstat (limited to 'net/ris/files/patch-infparser.py')
-rw-r--r-- | net/ris/files/patch-infparser.py | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/net/ris/files/patch-infparser.py b/net/ris/files/patch-infparser.py index b1fe739dcaea..12283379ae2e 100644 --- a/net/ris/files/patch-infparser.py +++ b/net/ris/files/patch-infparser.py @@ -1,37 +1,38 @@ ---- infparser.py.orig Fri Sep 2 14:15:32 2005 -+++ infparser.py Fri Sep 2 14:18:12 2005 +--- infparser.py.orig Tue Aug 7 16:10:14 2007 ++++ infparser.py Tue Aug 7 17:09:32 2007 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#! @PYTHON_CMD@ # -*- Mode: Python; tab-width: 4 -*- # # Inf Driver parser -@@ -143,7 +143,7 @@ - if name.endswith('.services'): - prefix = name.split('.services', 1)[0] - check = prefix.split('.') -- if check[-1].startswith('nt'): -+ if check[-1].startswith('nt') and not check[-1].endswith('64'): - check = check[:-1] - check = check + ['services'] - name = '.'.join(check) -@@ -154,7 +154,7 @@ - while check[-1].isdigit() and len(check)>1: - check = check[:-1] - -- if check[-1].startswith('nt'): -+ if check[-1].startswith('nt') and not check[-1].endswith('64'): - check = check[:-1] - - name = '.'.join(check) -@@ -283,8 +283,8 @@ +@@ -293,28 +293,6 @@ if inffile.split('/').pop() not in exclude: devlist.update(scan_inf(inffile)) - -- print 'Compiled %d drivers' % len(devlist) -+ print 'Starting inf parser: compiled %d drivers.' % len(devlist) -- fd = open('devlist.cache','w') -+ fd = open('@DEVLIST_CACHE@','w') +- print 'Compiled %d drivers' % len(devlist) +- +- fd = open('devlist.cache', 'w') ++ fd = open('@DEVLIST_CACHE@', 'w') dump(devlist, fd) fd.close() +- print 'generated devlist.cache' +- +- fd = open('nics.txt', 'w') +- drvhash = {} +- for nic in devlist.items(): +- entry = nic[0].split('&') +- if len(entry) < 2: continue # just to be sure +- if not entry[0].startswith('PCI'): continue # skip usb +- vid = entry[0].split('VEN_').pop().lower() +- pid = entry[1].split('DEV_').pop().lower() +- key = (vid, pid) +- line = '%4s %4s %s %s\n' % (vid, pid, nic[1]['drv'], nic[1]['svc']) +- drvhash[key] = line +- +- drvlist = drvhash.values() +- drvlist.sort() +- fd.writelines(drvlist) +- fd.close() +- +- print 'generated nics.txt' |