summaryrefslogtreecommitdiff
path: root/net/ris/files/patch-infparser.py
diff options
context:
space:
mode:
authorRong-En Fan <rafan@FreeBSD.org>2007-08-12 11:03:16 +0000
committerRong-En Fan <rafan@FreeBSD.org>2007-08-12 11:03:16 +0000
commitba7c5acdb82919db297066262825a7591dd63e0d (patch)
tree244e5ae13a9ec92f5fda726e370fb645fe69b074 /net/ris/files/patch-infparser.py
parent- Update to 0.28 (diff)
- Update to 0.3
- Add pkg-message - Add filename remapping for tftp-hpa - Use PYTHON_CMD in scripts - Update master sites - Pass maintainership to submitter PR: ports/115301 Submitted by: Alex Deiter <tiamat at komi.mts.ru>
Notes
Notes: svn path=/head/; revision=197500
Diffstat (limited to '')
-rw-r--r--net/ris/files/patch-infparser.py53
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'