summaryrefslogtreecommitdiff
path: root/ext4_utils/make_ext4fs_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext4_utils/make_ext4fs_main.c')
-rw-r--r--ext4_utils/make_ext4fs_main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext4_utils/make_ext4fs_main.c b/ext4_utils/make_ext4fs_main.c
index f28e1b22..03872db6 100644
--- a/ext4_utils/make_ext4fs_main.c
+++ b/ext4_utils/make_ext4fs_main.c
@@ -57,7 +57,7 @@ static void usage(char *path)
fprintf(stderr, " [ -L <label> ] [ -f ] [ -a <android mountpoint> ] [ -u ]\n");
fprintf(stderr, " [ -S file_contexts ] [ -C fs_config ] [ -T timestamp ]\n");
fprintf(stderr, " [ -z | -s ] [ -w ] [ -c ] [ -J ] [ -v ] [ -B <block_list_file> ]\n");
- fprintf(stderr, " <filename> [<directory>]\n");
+ fprintf(stderr, " <filename> [[<directory>] <target_out_directory>]\n");
}
int main(int argc, char **argv)
@@ -65,6 +65,7 @@ int main(int argc, char **argv)
int opt;
const char *filename = NULL;
const char *directory = NULL;
+ const char *target_out_directory = NULL;
char *mountpoint = NULL;
fs_config_func_t fs_config_func = NULL;
const char *fs_config_file = NULL;
@@ -216,6 +217,9 @@ int main(int argc, char **argv)
if (optind < argc)
directory = argv[optind++];
+ if (optind < argc)
+ target_out_directory = argv[optind++];
+
if (optind < argc) {
fprintf(stderr, "Unexpected argument: %s\n", argv[optind]);
usage(argv[0]);
@@ -232,7 +236,7 @@ int main(int argc, char **argv)
fd = STDOUT_FILENO;
}
- exitcode = make_ext4fs_internal(fd, directory, mountpoint, fs_config_func, gzip,
+ exitcode = make_ext4fs_internal(fd, directory, target_out_directory, mountpoint, fs_config_func, gzip,
sparse, crc, wipe, real_uuid, sehnd, verbose, fixed_time, block_list_file);
close(fd);
if (block_list_file)