vold: Don't freak out if an asec mountpoint already exists

Signed-off-by: San Mehat <san@google.com>
This commit is contained in:
San Mehat 2010-01-07 12:12:50 -08:00
parent fff0b47998
commit eb13a90bb9

View file

@ -220,11 +220,13 @@ int VolumeManager::createAsec(const char *id, int sizeMb,
snprintf(mountPoint, sizeof(mountPoint), "/asec/%s", id);
if (mkdir(mountPoint, 0777)) {
if (errno != EEXIST) {
LOGE("Mountpoint creation failed (%s)", strerror(errno));
Loop::destroyByDevice(loopDevice);
unlink(asecFileName);
return -1;
}
}
if (Fat::doMount(loopDevice, mountPoint, false, false, ownerUid,
0, 0007, false)) {