]>
git.ipfire.org Git - ipfire-3.x.git/blob - kernel/scripts/configdiff.py
2 ###############################################################################
3 # IPFire.org - An Open Source Firewall Solution #
4 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
5 ###############################################################################
10 filelist
= sys
.argv
[1:]
15 for line
in f
.readlines():
21 m
= re
.match("^# (.*) is not set$", line
)
26 m
= re
.match("^(.*)=(.*)$", line
)
32 option_value
= "%s=%s" % (option
, value
or "")
33 options
.append(option_value
)
41 for line
in f
.readlines():
45 if not line
or line
== "#":
48 if line
.startswith("# Automatically generated file;"):
51 if line
.endswith("Kernel Configuration"):
55 m
= re
.match("# end of (.*)$", line
)
59 if _section
in printed_sections
:
60 print "# end of %s" % _section
65 m
= re
.match("^# (.*)$", line
)
66 if m
and not "CONFIG_" in line
:
73 m
= re
.match("^# (.*) is not set$", line
)
78 m
= re
.match("^(.*)=(.*)$", line
)
86 # Ignore all options CONFIG_HAVE_ because we cannot
88 elif option
.startswith("CONFIG_HAVE_"):
91 option_value
= "%s=%s" % (option
, value
)
92 if not option_value
in options
:
93 if section
and not section
in printed_sections
:
96 print "# %s" % section
98 printed_sections
.append(section
)
101 print "# %s is not set" % option
103 print "%s=%s" % (option
, value
)