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
diff --git a/init/ueventd_parser.cpp b/init/ueventd_parser.cpp
index cd7adb4..f74c878 100644
--- a/init/ueventd_parser.cpp
+++ b/init/ueventd_parser.cpp
@@ -132,8 +132,10 @@
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