diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-01-06 03:28:28 +0100 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-01-06 03:28:28 +0100 |
commit | d053eb8096a790d81b67c844d918341e797c2659 (patch) | |
tree | 41493bdf9374493f0e19db9f0c4a6eb4b69d4328 /tar/tar2sqfs.c | |
parent | 61da4d9d3249cc6001c64d371ef1bf82aeeab616 (diff) |
Cleanup: use parse_size function to parse compressor options
The XZ option parser had a similar function to parse_size. This commit
removes the other implementation and extends parse_size with the one
missing feature, i.e. allowing a '%' suffix for a relative value.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tar/tar2sqfs.c')
-rw-r--r-- | tar/tar2sqfs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tar/tar2sqfs.c b/tar/tar2sqfs.c index facef07..12055c3 100644 --- a/tar/tar2sqfs.c +++ b/tar/tar2sqfs.c @@ -124,12 +124,14 @@ static void process_args(int argc, char **argv) no_tail_pack = true; break; case 'b': - if (parse_size("Block size", &cfg.block_size, optarg)) + if (parse_size("Block size", &cfg.block_size, + optarg, 0)) { exit(EXIT_FAILURE); + } break; case 'B': if (parse_size("Device block size", &cfg.devblksize, - optarg)) { + optarg, 0)) { exit(EXIT_FAILURE); } if (cfg.devblksize < 1024) { |