diff options
Diffstat (limited to 'cgpt/cmd_boot.c')
-rw-r--r-- | cgpt/cmd_boot.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/cgpt/cmd_boot.c b/cgpt/cmd_boot.c index 2f815663..a556b53b 100644 --- a/cgpt/cmd_boot.c +++ b/cgpt/cmd_boot.c @@ -43,19 +43,11 @@ int cmd_boot(int argc, char *argv[]) { { case 'D': params.drive_size = strtoull(optarg, &e, 0); - if (!*optarg || (e && *e)) - { - Error("invalid argument to -%c: \"%s\"\n", c, optarg); - errorcnt++; - } + errorcnt += check_int_parse(c, e); break; case 'i': params.partition = (uint32_t)strtoul(optarg, &e, 0); - if (!*optarg || (e && *e)) - { - Error("invalid argument to -%c: \"%s\"\n", c, optarg); - errorcnt++; - } + errorcnt += check_int_parse(c, e); break; case 'b': params.bootfile = optarg; |