summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJin Qian <jinqian@google.com>2017-01-06 16:39:38 -0800
committerJin Qian <jinqian@google.com>2017-01-06 16:39:38 -0800
commit434347a990c16a44d0e0180b664297c9fb2a7e20 (patch)
treed35bb44b20a6e03dc8fe22f33ffe4e34ff2a15b1
parent25fa365361e04cd9a98c9e84df585bbbf593fbbe (diff)
downloadextras-434347a990c16a44d0e0180b664297c9fb2a7e20.tar.gz
ext4_utils: disable sparse io for e2fsdroid if image is not sparse
Change-Id: I05fda0b9895e0c68730220057de7b7abe1c79930
-rwxr-xr-xext4_utils/mkuserimg_mke2fs.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext4_utils/mkuserimg_mke2fs.sh b/ext4_utils/mkuserimg_mke2fs.sh
index 018b24b7..f8aef217 100755
--- a/ext4_utils/mkuserimg_mke2fs.sh
+++ b/ext4_utils/mkuserimg_mke2fs.sh
@@ -16,8 +16,10 @@ MKE2FS_OPTS=""
E2FSDROID_OPTS=""
if [ "$1" = "-s" ]; then
- MKE2FS_OPTS+="-E android_sparse"
+ MKE2FS_OPTS+="-E android_sparse"
shift
+else
+ E2FSDROID_OPTS+="-e"
fi
if [ $# -lt 5 ]; then