summaryrefslogtreecommitdiffstats
path: root/init/ueventd_parser.cpp
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2017-11-10 14:20:47 -0800
committerSteven Moreland <smoreland@google.com>2017-11-15 10:39:29 -0800
commit7d0a5c3656ee56eb81e442b58063d500b4f506e0 (patch)
tree1b066819020691798e8f57bc3b64c58e11f21f2f /init/ueventd_parser.cpp
parentb480d441ac092fc855711180023e6292e705e589 (diff)
downloadsystem_core-7d0a5c3656ee56eb81e442b58063d500b4f506e0.tar.gz
system_core-7d0a5c3656ee56eb81e442b58063d500b4f506e0.tar.bz2
system_core-7d0a5c3656ee56eb81e442b58063d500b4f506e0.zip
EndSection returns Result<Success>
Allow it to fail. When there is an error for a section ending, print the error pointing to the line where the section starts. Bug: 69050941 Test: boot, init_tests Change-Id: I1d8ed25f4b74cc9ac24d38b8075751c7d606aea8
Diffstat (limited to 'init/ueventd_parser.cpp')
-rw-r--r--init/ueventd_parser.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/init/ueventd_parser.cpp b/init/ueventd_parser.cpp
index cd7adb433..f74c87849 100644
--- a/init/ueventd_parser.cpp
+++ b/init/ueventd_parser.cpp
@@ -132,8 +132,10 @@ Result<Success> SubsystemParser::ParseLineSection(std::vector<std::string>&& arg
return std::invoke(*parser, this, std::move(args));
}
-void SubsystemParser::EndSection() {
+Result<Success> SubsystemParser::EndSection() {
subsystems_->emplace_back(std::move(subsystem_));
+
+ return Success();
}
} // namespace init