ASEC resize tweaking, allow read-write mounting.

Resize is no-op when sector count is unchanged; the caller can't
anticipate how vold does its sector calculations.

After resizing, we need to mount the container read-write, so allow
the caller to request "ro" or "rw" mode.

Handle ENOTSUP when trying to fallocate() on some filesystems

Bug: 16514385
Change-Id: I0d3a378280d4c36d14f8108ff428102283d583fa
diff --git a/Loop.cpp b/Loop.cpp
index 8672d93..11c114f 100644
--- a/Loop.cpp
+++ b/Loop.cpp
@@ -260,7 +260,7 @@
     SLOGD("Attempting to increase size of %s to %d sectors.", file, numSectors);
 
     if (fallocate(fd, 0, 0, numSectors * 512)) {
-        if (errno == ENOSYS) {
+        if (errno == ENOSYS || errno == ENOTSUP) {
             SLOGW("fallocate not found. Falling back to ftruncate.");
             if (ftruncate(fd, numSectors * 512) < 0) {
                 SLOGE("Error truncating imagefile (%s)", strerror(errno));