SOURCES: kernel-config.py - more strict values parser
glen
glen at pld-linux.org
Tue Jan 29 08:30:23 CET 2008
Author: glen Date: Tue Jan 29 07:30:23 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- more strict values parser
---- Files affected:
SOURCES:
kernel-config.py (1.7 -> 1.8)
---- Diffs:
================================================================
Index: SOURCES/kernel-config.py
diff -u SOURCES/kernel-config.py:1.7 SOURCES/kernel-config.py:1.8
--- SOURCES/kernel-config.py:1.7 Tue Jan 29 00:47:24 2008
+++ SOURCES/kernel-config.py Tue Jan 29 08:30:18 2008
@@ -139,7 +139,11 @@
cfg += "CONFIG_%s=m\n" % key
elif val == "n":
cfg += "# CONFIG_%s is not set\n" % key
- elif re.compile('^[a-zA-Z0-9"\_\/\-]+$').match(val):
+ elif re.compile('^"[^"]*"$').match(val):
+ cfg += "CONFIG_%s=%s\n" % (key, val)
+ elif re.compile('^-?[0-9]+$').match(val):
+ cfg += "CONFIG_%s=%s\n" % (key, val)
+ elif re.compile('^0x[0-9A-F]+$').match(val):
cfg += "CONFIG_%s=%s\n" % (key, val)
else:
print "Unknown value [%s] for key: %s" % (val, key)
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/kernel-config.py?r1=1.7&r2=1.8&f=u
More information about the pld-cvs-commit
mailing list