7 return "TYPE_" + x
.upper()
9 re_comments
=re
.compile(r
'#.*$')
11 bl
= file(sys
.argv
[1])
13 print r
'struct blacklist_entry blacklist[] = {'
15 for line
in bl
.readlines():
16 line
= re_comments
.sub("", line
).strip()
21 fields
= line
.split(":")
25 (kext
, func
, ty
) = fields
30 kext
= '"' + kext
+ '"'
35 func
= '"' + func
+ '"'
44 }},""".format(kext
, func
, type_map(ty
))