init: Break FindPlatformDevice() into a helper function
We want to use the logic for FindPlatformDevice() in a future change
to look for devices that have USB parents. Break out a helper
function.
This change is intended to be a no-op and just a reorganization.
Bug: 316324155
Test: See boot devices still found
Change-Id: Ic5a57a89339c43dea1334644be9386637169c61c
diff --git a/init/devices.h b/init/devices.h
index 82cb56e..7eee87a 100644
--- a/init/devices.h
+++ b/init/devices.h
@@ -143,6 +143,8 @@
private:
void ColdbootDone() override;
BlockDeviceInfo GetBlockDeviceInfo(const std::string& uevent_path) const;
+ bool FindSubsystemDevice(std::string path, std::string* device_path,
+ const std::set<std::string>& subsystem_paths) const;
bool FindPlatformDevice(std::string path, std::string* platform_device_path) const;
std::tuple<mode_t, uid_t, gid_t> GetDevicePermissions(
const std::string& path, const std::vector<std::string>& links) const;