init: add back TARGET_INIT_VENDOR_LIB for vendor_load_properties
squashed:
init: add libinit hook for devices to create device links
let devices react to device uevents e.g. for creating
links in /dev/block/by-name/ when there is no partition name
available like on raspi with MBR boot device
Change-Id: If657c2608dc5f5363fed4a987f496cd09b56816f
diff --git a/init/devices.cpp b/init/devices.cpp
index 5560c20..b202eea 100644
--- a/init/devices.cpp
+++ b/init/devices.cpp
@@ -42,6 +42,10 @@
#include "selabel.h"
#include "util.h"
+#ifdef TARGET_CREATE_DEVICE_SYMLINKS
+#include "vendor_init.h"
+#endif
+
using namespace std::chrono_literals;
using android::base::Basename;
@@ -438,6 +442,10 @@
links.emplace_back("/dev/sys/block/by-name/zoned_device");
}
+#ifdef TARGET_CREATE_DEVICE_SYMLINKS
+ vendor_create_device_symlinks(uevent.partition_num, uevent.device_name, links);
+#endif
+
auto last_slash = uevent.path.rfind('/');
links.emplace_back(link_path + "/" + uevent.path.substr(last_slash + 1));