aboutsummaryrefslogtreecommitdiff
path: root/mkfs
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-01-06 03:28:28 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-01-06 03:28:28 +0100
commitd053eb8096a790d81b67c844d918341e797c2659 (patch)
tree41493bdf9374493f0e19db9f0c4a6eb4b69d4328 /mkfs
parent61da4d9d3249cc6001c64d371ef1bf82aeeab616 (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 'mkfs')
-rw-r--r--mkfs/options.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mkfs/options.c b/mkfs/options.c
index 1fe6081..c063e7c 100644
--- a/mkfs/options.c
+++ b/mkfs/options.c
@@ -186,7 +186,7 @@ void process_command_line(options_t *opt, int argc, char **argv)
break;
case 'b':
if (parse_size("Block size", &opt->cfg.block_size,
- optarg)) {
+ optarg, 0)) {
exit(EXIT_FAILURE);
}
break;
@@ -198,7 +198,7 @@ void process_command_line(options_t *opt, int argc, char **argv)
break;
case 'B':
if (parse_size("Device block size",
- &opt->cfg.devblksize, optarg)) {
+ &opt->cfg.devblksize, optarg, 0)) {
exit(EXIT_FAILURE);
}
if (opt->cfg.devblksize < 1024) {