ueventd: fix subsystem list logic issues
1) Check subsystems list before doing usb subsystem logic. This allows
developers to handle usb* subsystems in ueventd.rc files.
2) Fix a bug where each subsystem_ instance is not reinitialized, but
rather only the name_ member was set.
Test: boot bullhead
Test: check that multiple uevent_devname subsystems work when
specified in ueventd.rc
Change-Id: Ifcac04763afcaf72a3b14ef5f3a6cb89981b51a1
diff --git a/init/ueventd_parser.cpp b/init/ueventd_parser.cpp
index e831b8b..cd7adb4 100644
--- a/init/ueventd_parser.cpp
+++ b/init/ueventd_parser.cpp
@@ -82,7 +82,7 @@
return Error() << "ignoring duplicate subsystem entry";
}
- subsystem_.name_ = args[1];
+ subsystem_ = Subsystem(std::move(args[1]));
return Success();
}