erpt: include all known types/categories in autogen

This commit is contained in:
Michael Scire 2020-04-10 03:33:30 -07:00
parent 50ea19e7a2
commit eca5ac01b8
2 changed files with 4 additions and 2 deletions

View file

@ -99,6 +99,7 @@
HANDLER(RadioStrengthInfo, 58 ) \ HANDLER(RadioStrengthInfo, 58 ) \
HANDLER(ErrorInfoAuto, 59 ) \ HANDLER(ErrorInfoAuto, 59 ) \
HANDLER(AccessPointInfo, 60 ) \ HANDLER(AccessPointInfo, 60 ) \
HANDLER(ErrorInfoDefaults, 61 ) \
HANDLER(SystemPowerStateInfo, 62 ) \ HANDLER(SystemPowerStateInfo, 62 ) \
HANDLER(PerformanceInfo, 63 ) \ HANDLER(PerformanceInfo, 63 ) \
HANDLER(ThrottlingInfo, 64 ) \ HANDLER(ThrottlingInfo, 64 ) \
@ -109,6 +110,7 @@
HANDLER(RunningApplicationInfo, 69 ) \ HANDLER(RunningApplicationInfo, 69 ) \
HANDLER(RunningAppletInfo, 70 ) \ HANDLER(RunningAppletInfo, 70 ) \
HANDLER(FocusedAppletHistoryInfo, 71 ) \ HANDLER(FocusedAppletHistoryInfo, 71 ) \
HANDLER(CompositorInfo, 72 ) \
HANDLER(BatteryChargeInfo, 73 ) \ HANDLER(BatteryChargeInfo, 73 ) \
HANDLER(NANDExtendedCsd, 74 ) \ HANDLER(NANDExtendedCsd, 74 ) \
HANDLER(NANDPatrolInfo, 75 ) \ HANDLER(NANDPatrolInfo, 75 ) \

View file

@ -396,11 +396,11 @@ def main(argc, argv):
with open(argv[1]+'.hpp', 'w') as out: with open(argv[1]+'.hpp', 'w') as out:
out.write(HEADER) out.write(HEADER)
out.write('#define AMS_ERPT_FOREACH_FIELD_TYPE(HANDLER) \\\n') out.write('#define AMS_ERPT_FOREACH_FIELD_TYPE(HANDLER) \\\n')
for tp in sorted(list(set(types))): for tp in sorted(list(set(types + FIELD_TYPES.keys()))):
out.write((' HANDLER(%%-%ds %%-2d) \\\n' % (mt+1)) % (typ_to_string(tp)+',', tp)) out.write((' HANDLER(%%-%ds %%-2d) \\\n' % (mt+1)) % (typ_to_string(tp)+',', tp))
out.write('\n') out.write('\n')
out.write('#define AMS_ERPT_FOREACH_CATEGORY(HANDLER) \\\n') out.write('#define AMS_ERPT_FOREACH_CATEGORY(HANDLER) \\\n')
for ct in sorted(list(set(cats))): for ct in sorted(list(set(cats + CATEGORIES.keys()))):
out.write((' HANDLER(%%-%ds %%-3d) \\\n' % (mc+1)) % (cat_to_string(ct)+',', ct)) out.write((' HANDLER(%%-%ds %%-3d) \\\n' % (mc+1)) % (cat_to_string(ct)+',', ct))
out.write('\n') out.write('\n')
out.write('#define AMS_ERPT_FOREACH_FIELD(HANDLER) \\\n') out.write('#define AMS_ERPT_FOREACH_FIELD(HANDLER) \\\n')