aboutsummaryrefslogtreecommitdiff
path: root/tar
diff options
context:
space:
mode:
Diffstat (limited to 'tar')
-rw-r--r--tar/tar2sqfs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tar/tar2sqfs.c b/tar/tar2sqfs.c
index f522239..facef07 100644
--- a/tar/tar2sqfs.c
+++ b/tar/tar2sqfs.c
@@ -124,10 +124,14 @@ static void process_args(int argc, char **argv)
no_tail_pack = true;
break;
case 'b':
- cfg.block_size = strtol(optarg, NULL, 0);
+ if (parse_size("Block size", &cfg.block_size, optarg))
+ exit(EXIT_FAILURE);
break;
case 'B':
- cfg.devblksize = strtol(optarg, NULL, 0);
+ if (parse_size("Device block size", &cfg.devblksize,
+ optarg)) {
+ exit(EXIT_FAILURE);
+ }
if (cfg.devblksize < 1024) {
fputs("Device block size must be at "
"least 1024\n", stderr);