am 5cf6325c
: Merge "Unshare ums when SD card is removed"
* commit '5cf6325c91792dbb1bb08fa1958c1fc8a5b9c45d': Unshare ums when SD card is removed
This commit is contained in:
commit
0e110bb5a2
1 changed files with 5 additions and 0 deletions
|
@ -275,6 +275,11 @@ void DirectVolume::handleDiskRemoved(const char *devpath, NetlinkEvent *evt) {
|
|||
int major = atoi(evt->findParam("MAJOR"));
|
||||
int minor = atoi(evt->findParam("MINOR"));
|
||||
char msg[255];
|
||||
bool enabled;
|
||||
|
||||
if (mVm->shareEnabled(getLabel(), "ums", &enabled) == 0 && enabled) {
|
||||
mVm->unshareVolume(getLabel(), "ums");
|
||||
}
|
||||
|
||||
SLOGD("Volume %s %s disk %d:%d removed\n", getLabel(), getMountpoint(), major, minor);
|
||||
snprintf(msg, sizeof(msg), "Volume %s %s disk removed (%d:%d)",
|
||||
|
|
Loading…
Reference in a new issue