diff options
author | Patrick Tjin <pattjin@google.com> | 2018-03-23 13:38:05 -0700 |
---|---|---|
committer | Tao Bao <tbao@google.com> | 2018-04-22 22:05:50 -0700 |
commit | e2f989a97181639209f044618231f7b75d965fc0 (patch) | |
tree | 9365a1ad6cfeee3c223436f704883c185ed779b1 /ext4_utils | |
parent | 50df4e8f4355c1778aff01e041ac3441b078c139 (diff) | |
download | extras-e2f989a97181639209f044618231f7b75d965fc0.tar.gz |
mkuserimg_mke2fs: Support passing reserved block percent
Add support for passing reserved block percent when making
filesystem (-M)
Bug: 75975085
Test: build taimen, check that -M option takes effect
Change-Id: Ie70159b2cce01e0611299726378e3bcf46fde389
Merged-In: Ie70159b2cce01e0611299726378e3bcf46fde389
(cherry picked from commit 15091d05ccb8cd8e7dce61cb2e0d781006494fdc)
Diffstat (limited to 'ext4_utils')
-rwxr-xr-x | ext4_utils/mkuserimg_mke2fs.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext4_utils/mkuserimg_mke2fs.sh b/ext4_utils/mkuserimg_mke2fs.sh index ea73ff70..1d5c0afc 100755 --- a/ext4_utils/mkuserimg_mke2fs.sh +++ b/ext4_utils/mkuserimg_mke2fs.sh @@ -8,7 +8,7 @@ Usage: mkuserimg.sh [-s] SRC_DIR OUTPUT_FILE EXT_VARIANT MOUNT_POINT SIZE [-j <journal_size>] [-T TIMESTAMP] [-C FS_CONFIG] [-D PRODUCT_OUT] [-B BLOCK_LIST_FILE] [-d BASE_ALLOC_FILE_IN ] [-A BASE_ALLOC_FILE_OUT ] [-L LABEL] - [-i INODES ] [-e ERASE_BLOCK_SIZE] [-o FLASH_BLOCK_SIZE] + [-i INODES ] [-M RSV_PCT] [-e ERASE_BLOCK_SIZE] [-o FLASH_BLOCK_SIZE] [-U MKE2FS_UUID] [-S MKE2FS_HASH_SEED] [FILE_CONTEXTS] EOT } @@ -94,6 +94,11 @@ if [[ "$1" == "-i" ]]; then shift; shift fi +if [[ "$1" == "-M" ]]; then + MKE2FS_OPTS+=" -m $2" + shift; shift +fi + if [[ "$1" == "-e" ]]; then if [[ $MKE2FS_EXTENDED_OPTS ]]; then MKE2FS_EXTENDED_OPTS+="," |