Commits

Jean-Baptiste Queru  committed 7bffd44 Merge

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

* commit '0e110bb5a2559b60003effa0e0bf460993e634a6':
Unshare ums when SD card is removed

  • Participants
  • Parent commits af05ec0, 0e110bb

Comments (0)

Files changed (1)

File DirectVolume.cpp

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