Skip to content

Commit bf1414c

Browse files
committed
flux-restore: use optparse_get_size() for --size-limit
Problem: The flux-restore(1) --size-limit=N option takes an argument in bytes, but this can be cumbersome for larger values. Use optparse_get_size_int() for the --size-limit option so that any of 'k', 'K', 'M', or 'G' for value < 2G can be used as an argument to this option.
1 parent b6f6a06 commit bf1414c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd/builtin/restore.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ static int cmd_restore (optparse_t *p, int ac, char *av[])
366366
content_flags |= CONTENT_FLAG_CACHE_BYPASS;
367367
kvs_checkpoint_flags |= KVS_CHECKPOINT_FLAG_CACHE_BYPASS;
368368
}
369-
blob_size_limit = optparse_get_int (p, "size-limit", 0);
369+
blob_size_limit = optparse_get_size_int (p, "size-limit", "0");
370370

371371
h = builtin_get_flux_handle (p);
372372
ar = restore_create (infile);

0 commit comments

Comments
 (0)