1
0
Fork 0

android: vold: Support to ignore boot device

Signed-off-by: hmz007 <hmz007@gmail.com>
master
hmz007 5 years ago
parent 83e5afd006
commit 9e827e3be0

@ -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);

Loading…
Cancel
Save