diff --git a/system/vold/VolumeManager.cpp b/system/vold/VolumeManager.cpp index dc6fae98ddb..755a3ab9f93 100644 --- a/system/vold/VolumeManager.cpp +++ b/system/vold/VolumeManager.cpp @@ -45,6 +45,7 @@ #include #include +#include #include #include @@ -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);