diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-17 14:29:29 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-20 03:18:47 +0200 |
commit | 9d7d0a84a2017af2e70cc0f33bfbce0b59470e62 (patch) | |
tree | f06ddabcebc1210d3764ada396284b46cebedc8d /unpack/options.c | |
parent | 544f8f6dfd2f61fd1d2ab7a9a955e63d4b416dcc (diff) |
Remove parallel unpacking
Parallel unpacking didn't really improve the speed that much. Actually
sorting the files for optimized unpack order improved speed much more
than the parallel unpacker.
Furthermore, the fork based parallel unpacker was actually pretty messy
to begin with.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'unpack/options.c')
-rw-r--r-- | unpack/options.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/unpack/options.c b/unpack/options.c index e880656..c7689eb 100644 --- a/unpack/options.c +++ b/unpack/options.c @@ -22,7 +22,6 @@ static struct option long_opts[] = { { "set-xattr", no_argument, NULL, 'X' }, #endif { "set-times", no_argument, NULL, 'T' }, - { "jobs", required_argument, NULL, 'j' }, { "describe", no_argument, NULL, 'd' }, { "chmod", no_argument, NULL, 'C' }, { "chown", no_argument, NULL, 'O' }, @@ -74,7 +73,6 @@ static const char *help_string = #endif " --set-times, -T When unpacking files to disk, set the create\n" " and modify timestamps from the squashfs image.\n" -" --jobs, -j <count> Number of parallel unpacking jobs to start.\n" " --chmod, -C Change permission flags of unpacked files to\n" " those store in the squashfs image.\n" " --chown, -O Change ownership of unpacked files to the\n" @@ -110,7 +108,7 @@ static char *get_path(char *old, const char *arg) void process_command_line(options_t *opt, int argc, char **argv) { - int i, j; + int i; opt->op = OP_NONE; opt->rdtree_flags = 0; @@ -118,7 +116,6 @@ void process_command_line(options_t *opt, int argc, char **argv) opt->cmdpath = NULL; opt->unpack_root = NULL; opt->image_name = NULL; - opt->num_jobs = 1; for (;;) { i = getopt_long(argc, argv, short_opts, long_opts, NULL); @@ -159,17 +156,6 @@ void process_command_line(options_t *opt, int argc, char **argv) case 'T': opt->flags |= UNPACK_SET_TIMES; break; - case 'j': - for (j = 0; optarg[j] != '\0'; ++j) { - if (j > 6 || !isdigit(optarg[j])) - goto fail_num_jobs; - } - - opt->num_jobs = atoi(optarg); - - if (opt->num_jobs < 1) - goto fail_num_jobs; - break; case 'c': opt->op = OP_CAT; opt->cmdpath = get_path(opt->cmdpath, optarg); @@ -227,7 +213,4 @@ fail_arg: fprintf(stderr, "Try `%s --help' for more information.\n", __progname); free(opt->cmdpath); exit(EXIT_FAILURE); -fail_num_jobs: - fputs("Expected a positive integer for --jobs.\n", stderr); - goto fail_arg; } |