diff options
author | Ken Sumrall <ksumrall@android.com> | 2011-06-29 20:28:30 -0700 |
---|---|---|
committer | Ken Sumrall <ksumrall@android.com> | 2011-06-29 20:28:30 -0700 |
commit | 107a9f161babc20daf915311146b0e864d3b4157 (patch) | |
tree | f9dbc434d9c73b0750da8895ca16ca40f364f15d /ext4_utils/make_ext4fs_main.c | |
parent | 7e5ff13c55eb29748c07768bd7134819cbcbd4b0 (diff) | |
download | extras-107a9f161babc20daf915311146b0e864d3b4157.tar.gz |
Bug fixes to make_ext4fs
Fix definition of uuid struct.
Properly set the block_group number in each backup copy of the superblock.
Adjust the info.total_inodes field after rounding up the inodes per block group.
Add the option -t to initialize all the inode tables. If also specified with
the -s option, use the CHUNK_TYPE_FILL sparse records to initialize them.
Change-Id: Idd8bcee1b9bde3e82ad8da89ef974fbc12d7a6c6
Diffstat (limited to 'ext4_utils/make_ext4fs_main.c')
-rw-r--r-- | ext4_utils/make_ext4fs_main.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ext4_utils/make_ext4fs_main.c b/ext4_utils/make_ext4fs_main.c index 8742e611..d616c6d4 100644 --- a/ext4_utils/make_ext4fs_main.c +++ b/ext4_utils/make_ext4fs_main.c @@ -33,7 +33,7 @@ static void usage(char *path) fprintf(stderr, "%s [ -l <len> ] [ -j <journal size> ] [ -b <block_size> ]\n", basename(path)); fprintf(stderr, " [ -g <blocks per group> ] [ -i <inodes> ] [ -I <inode size> ]\n"); fprintf(stderr, " [ -L <label> ] [ -f ] [ -a <android mountpoint> ]\n"); - fprintf(stderr, " [ -z | -s ] [ -J ]\n"); + fprintf(stderr, " [ -z | -s ] [ -t ] [ -w ] [ -c ] [ -J ]\n"); fprintf(stderr, " <filename> [<directory>]\n"); } @@ -48,8 +48,9 @@ int main(int argc, char **argv) int sparse = 0; int crc = 0; int wipe = 0; + int init_itabs = 0; - while ((opt = getopt(argc, argv, "l:j:b:g:i:I:L:a:fwzJsc")) != -1) { + while ((opt = getopt(argc, argv, "l:j:b:g:i:I:L:a:fwzJsct")) != -1) { switch (opt) { case 'l': info.len = parse_num(optarg); @@ -94,6 +95,9 @@ int main(int argc, char **argv) case 's': sparse = 1; break; + case 't': + init_itabs = 1; + break; default: /* '?' */ usage(argv[0]); exit(EXIT_FAILURE); @@ -136,5 +140,5 @@ int main(int argc, char **argv) } return make_ext4fs_internal(filename, directory, mountpoint, android, gzip, - sparse, crc, wipe); + sparse, crc, wipe, init_itabs); } |