vold: Don't freak out if an asec mountpoint already exists
Signed-off-by: San Mehat <san@google.com>
This commit is contained in:
parent
fff0b47998
commit
eb13a90bb9
1 changed files with 6 additions and 4 deletions
|
@ -220,10 +220,12 @@ int VolumeManager::createAsec(const char *id, int sizeMb,
|
||||||
|
|
||||||
snprintf(mountPoint, sizeof(mountPoint), "/asec/%s", id);
|
snprintf(mountPoint, sizeof(mountPoint), "/asec/%s", id);
|
||||||
if (mkdir(mountPoint, 0777)) {
|
if (mkdir(mountPoint, 0777)) {
|
||||||
LOGE("Mountpoint creation failed (%s)", strerror(errno));
|
if (errno != EEXIST) {
|
||||||
Loop::destroyByDevice(loopDevice);
|
LOGE("Mountpoint creation failed (%s)", strerror(errno));
|
||||||
unlink(asecFileName);
|
Loop::destroyByDevice(loopDevice);
|
||||||
return -1;
|
unlink(asecFileName);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Fat::doMount(loopDevice, mountPoint, false, false, ownerUid,
|
if (Fat::doMount(loopDevice, mountPoint, false, false, ownerUid,
|
||||||
|
|
Loading…
Reference in a new issue