summaryrefslogtreecommitdiff
path: root/tools/incident_section_gen/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/incident_section_gen/main.cpp')
-rw-r--r--tools/incident_section_gen/main.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/incident_section_gen/main.cpp b/tools/incident_section_gen/main.cpp
index ba1267b28fbb..dd266ffe0f16 100644
--- a/tools/incident_section_gen/main.cpp
+++ b/tools/incident_section_gen/main.cpp
@@ -418,7 +418,7 @@ static bool generateSectionListCpp(Descriptor const* descriptor) {
}
const SectionFlags s = getSectionFlags(field);
- if (s.userdebug_and_eng_only()) {
+ if (s.userdebug_and_eng_only() || s.type() == SECTION_TEXT_DUMPSYS) {
printf("#if ALLOW_RESTRICTED_SECTIONS\n");
}
@@ -439,7 +439,9 @@ static bool generateSectionListCpp(Descriptor const* descriptor) {
printf(" NULL),\n");
break;
case SECTION_LOG:
- printf(" new LogSection(%d, %s),\n", field->number(), s.args().c_str());
+ printf(" new LogSection(%d, ", field->number());
+ splitAndPrint(s.args());
+ printf(" NULL),\n");
break;
case SECTION_GZIP:
printf(" new GZipSection(%d,", field->number());
@@ -450,8 +452,13 @@ static bool generateSectionListCpp(Descriptor const* descriptor) {
printf(" new TombstoneSection(%d, \"%s\"),\n", field->number(),
s.args().c_str());
break;
+ case SECTION_TEXT_DUMPSYS:
+ printf(" new TextDumpsysSection(%d, ", field->number());
+ splitAndPrint(s.args());
+ printf(" NULL),\n");
+ break;
}
- if (s.userdebug_and_eng_only()) {
+ if (s.userdebug_and_eng_only() || s.type() == SECTION_TEXT_DUMPSYS) {
printf("#endif\n");
}
}