diff options
author | marcel <marcel@FreeBSD.org> | 2006-10-04 18:20:25 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2006-10-04 18:20:25 +0000 |
commit | bcfb48e2eb5e6a01dcf8f984368d5c5dff75375e (patch) | |
tree | 0737832541a09369a5f355785c9cd69f725c6c84 /sbin/gpt/remove.c | |
parent | c0d4b0e19f9d154eb73d29fe68f538e1fe18ee43 (diff) | |
download | FreeBSD-src-bcfb48e2eb5e6a01dcf8f984368d5c5dff75375e.zip FreeBSD-src-bcfb48e2eb5e6a01dcf8f984368d5c5dff75375e.tar.gz |
Use strtoll(3) instead of strtol(3) for the starting block or
partition size. On 32-bit platforms sizeof(long) < sizeof(off_t)
and using strtol(3) would prevent partitions larger than 4G
sectors or beyond 4G blocks.
PR: bin/103991
MFC after: 3 days
Diffstat (limited to 'sbin/gpt/remove.c')
-rw-r--r-- | sbin/gpt/remove.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/gpt/remove.c b/sbin/gpt/remove.c index 0515fc1..381ff0b 100644 --- a/sbin/gpt/remove.c +++ b/sbin/gpt/remove.c @@ -155,7 +155,7 @@ cmd_remove(int argc, char *argv[]) case 'b': if (block > 0) usage_remove(); - block = strtol(optarg, &p, 10); + block = strtoll(optarg, &p, 10); if (*p != 0 || block < 1) usage_remove(); break; @@ -169,7 +169,7 @@ cmd_remove(int argc, char *argv[]) case 's': if (size > 0) usage_remove(); - size = strtol(optarg, &p, 10); + size = strtoll(optarg, &p, 10); if (*p != 0 || size < 1) usage_remove(); break; |