|
|
|
@ -44,6 +44,7 @@
|
|
|
|
|
#include <async_safe/log.h>
|
|
|
|
|
|
|
|
|
|
#include <cutils/fs.h>
|
|
|
|
|
#include <cutils/properties.h>
|
|
|
|
|
#include <utils/Trace.h>
|
|
|
|
|
|
|
|
|
|
#include <selinux/android.h>
|
|
|
|
@ -212,6 +213,14 @@ void VolumeManager::handleBlockEvent(NetlinkEvent* evt) {
|
|
|
|
|
|
|
|
|
|
if (devType != "disk") return;
|
|
|
|
|
|
|
|
|
|
char boot_devices[PROPERTY_VALUE_MAX];
|
|
|
|
|
property_get("ro.boot.boot_devices", boot_devices, "");
|
|
|
|
|
if (strlen(boot_devices) > 0 &&
|
|
|
|
|
eventPath.find(boot_devices) != std::string::npos) {
|
|
|
|
|
LOG(DEBUG) << "ignore boot device " << boot_devices;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int major = std::stoi(evt->findParam("MAJOR"));
|
|
|
|
|
int minor = std::stoi(evt->findParam("MINOR"));
|
|
|
|
|
dev_t device = makedev(major, minor);
|
|
|
|
|