am 5cf6325c: Merge "Unshare ums when SD card is removed"

* commit '5cf6325c91792dbb1bb08fa1958c1fc8a5b9c45d':
  Unshare ums when SD card is removed
This commit is contained in:
Jean-Baptiste Queru 2012-05-08 13:39:20 -07:00 committed by Android Git Automerger
commit 0e110bb5a2

View file

@ -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)",