diff options
author | Xin Li <delphij@google.com> | 2020-08-31 21:21:38 -0700 |
---|---|---|
committer | Xin Li <delphij@google.com> | 2020-08-31 21:21:38 -0700 |
commit | 628590d7ec80e10a3fc24b1c18a1afb55cca10a8 (patch) | |
tree | 4b1c3f52d86d7fb53afbe9e9438468588fa489f8 /tools/incident_section_gen/main.cpp | |
parent | b11b8ec3aec8bb42f2c07e1c5ac7942da293baa8 (diff) | |
parent | d2d3a20624d968199353ccf6ddbae6f3ac39c9af (diff) |
Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
Diffstat (limited to 'tools/incident_section_gen/main.cpp')
-rw-r--r-- | tools/incident_section_gen/main.cpp | 13 |
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"); } } |