vold: Increase max supported loop devices to 255
Signed-off-by: San Mehat <san@google.com>
diff --git a/VolumeManager.cpp b/VolumeManager.cpp
index 1e1f15f..a462196 100644
--- a/VolumeManager.cpp
+++ b/VolumeManager.cpp
@@ -198,12 +198,7 @@
}
char loopDevice[255];
- if (Loop::getNextAvailable(loopDevice, sizeof(loopDevice))) {
- unlink(asecFileName);
- return -1;
- }
-
- if (Loop::create(loopDevice, asecFileName)) {
+ if (Loop::create(asecFileName, loopDevice, sizeof(loopDevice))) {
LOGE("ASEC loop device creation failed (%s)", strerror(errno));
unlink(asecFileName);
return -1;
@@ -327,12 +322,7 @@
char loopDevice[255];
if (Loop::lookupActive(asecFileName, loopDevice, sizeof(loopDevice))) {
- if (Loop::getNextAvailable(loopDevice, sizeof(loopDevice))) {
- LOGE("Unable to find loop device for ASEC mount");
- return -1;
- }
-
- if (Loop::create(loopDevice, asecFileName)) {
+ if (Loop::create(asecFileName, loopDevice, sizeof(loopDevice))) {
LOGE("ASEC loop device creation failed (%s)", strerror(errno));
return -1;
}