diff options
author | Tom Cherry <tomcherry@google.com> | 2018-10-26 12:33:52 -0700 |
---|---|---|
committer | Tom Cherry <tomcherry@google.com> | 2018-10-26 12:33:52 -0700 |
commit | 0166fd606d232fc50c7b9eb66f749b8b053f2818 (patch) | |
tree | 5accfe8062d7fd49841cbbaaad992788e2a7bdc8 /libpackagelistparser/packagelistparser_test.cpp | |
parent | 52db49b68fb6562300bc1fc4e08a1380e9b8d6d0 (diff) |
init: fix error messages when an invalid section header is found
If a section header such as 'on' or 'service' has an error with it,
the rest of the commands / options are currently reported as errors
since there is no valid parser object to parse them. For example,
service !@#$%%^&*() /system/bin/false
user root
group blah
blah blah
Generates:
init: /system/etc/init/bad.rc: 2: invalid service name '!@#$%%^&*()'
init: /system/etc/init/bad.rc: 3: Invalid section keyword found
init: /system/etc/init/bad.rc: 4: Invalid section keyword found
init: /system/etc/init/bad.rc: 5: Invalid section keyword found
This change suppresses the extraneous 'Invalid section keyword found'
messages.
Test: faulty error messages are suppressed.
Change-Id: Ieeb2d5b8b7eea33e191a88ce5a0d41701686943f
Diffstat (limited to 'libpackagelistparser/packagelistparser_test.cpp')
0 files changed, 0 insertions, 0 deletions