summaryrefslogtreecommitdiff
path: root/libopie2
authorclem <clem>2004-09-24 12:39:50 (UTC)
committer clem <clem>2004-09-24 12:39:50 (UTC)
commit478b2ead47a09956cadfacb8f469fb2fdee5531c (patch) (unidiff)
tree2e028e3de22a822d6ae779640e14999030ac3107 /libopie2
parent4761d0610715569c7af83dc68ffc90fea4d35690 (diff)
downloadopie-478b2ead47a09956cadfacb8f469fb2fdee5531c.zip
opie-478b2ead47a09956cadfacb8f469fb2fdee5531c.tar.gz
opie-478b2ead47a09956cadfacb8f469fb2fdee5531c.tar.bz2
Denote the end of the xargs parameters, to avoid "xargs: invalid option -- v"
kind of errors with old xargs.
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rwxr-xr-xlibopie2/tools/regen.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/libopie2/tools/regen.py b/libopie2/tools/regen.py
index 89385e1..2f53a14 100755
--- a/libopie2/tools/regen.py
+++ b/libopie2/tools/regen.py
@@ -2,25 +2,25 @@
2 2
3"""Regenerate C++ mapping classes""" 3"""Regenerate C++ mapping classes"""
4 4
5#---------------------------------------------------------------------------# 5#---------------------------------------------------------------------------#
6# # 6# #
7#---------------------------------------------------------------------------# 7#---------------------------------------------------------------------------#
8 8
9def regenDebugMapper( basename ): 9def regenDebugMapper( basename ):
10 """ 10 """
11 Debug Mapper - maps ioctl numbers to names, e.g. 0x4x5a -> SIOCGIWNAME 11 Debug Mapper - maps ioctl numbers to names, e.g. 0x4x5a -> SIOCGIWNAME
12 """ 12 """
13 13
14 result = os.popen( 'find /usr/include -name "*.h" |xargs grep -h SIOC|grep 0x' ).readlines() 14 result = os.popen( 'find /usr/include -name "*.h" |xargs -- grep -h SIOC|grep 0x' ).readlines()
15 15
16 try: 16 try:
17 tablehfile = file( basename+".h", "w" ) 17 tablehfile = file( basename+".h", "w" )
18 except: 18 except:
19 tablehfile = sys.stdout 19 tablehfile = sys.stdout
20 20
21 try: 21 try:
22 tablecfile = file( basename+".cpp", "w" ) 22 tablecfile = file( basename+".cpp", "w" )
23 except: 23 except:
24 tablecfile = sys.stdout 24 tablecfile = sys.stdout
25 25
26 print >>tablehfile,""" 26 print >>tablehfile,"""
@@ -260,13 +260,13 @@ Usage: %s <table> <basename>
260 260
261Available tables: %s 261Available tables: %s
262""" % ( sys.argv[0], [ str(k)[5:] for k in copy.copy( locals() ) if k.startswith( "regen" ) ] ) 262""" % ( sys.argv[0], [ str(k)[5:] for k in copy.copy( locals() ) if k.startswith( "regen" ) ] )
263 sys.exit( -1 ) 263 sys.exit( -1 )
264 264
265 try: 265 try:
266 func = locals()["regen%s" % sys.argv[1]] 266 func = locals()["regen%s" % sys.argv[1]]
267 except KeyError: 267 except KeyError:
268 print "Table '%s' unknown." % sys.argv[1] 268 print "Table '%s' unknown." % sys.argv[1]
269 sys.exit( -1 ) 269 sys.exit( -1 )
270 else: 270 else:
271 func( sys.argv[2] ) 271 func( sys.argv[2] )
272 sys.exit( 0 ) \ No newline at end of file 272 sys.exit( 0 )