summaryrefslogtreecommitdiffstats
path: root/commands/partition.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-02-06 09:09:41 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-02-12 09:33:43 +0100
commit10a0aaabfeca64519430fb3ee5a91260a7305cf5 (patch)
tree5bfb5756a15f0121c3b431948cfdb4a33f5db6ae /commands/partition.c
parentd397eb61628bde91503aa562a9fa939a3e07fc97 (diff)
downloadbarebox-10a0aaabfeca64519430fb3ee5a91260a7305cf5.tar.gz
barebox-10a0aaabfeca64519430fb3ee5a91260a7305cf5.tar.xz
cmdlinepart: make argument types safer
The return size should be loff_t to support partitions bigger than 4G. Also use const for the devname and endp. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/partition.c')
-rw-r--r--commands/partition.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/partition.c b/commands/partition.c
index c95433f3e..17ca136f9 100644
--- a/commands/partition.c
+++ b/commands/partition.c
@@ -41,7 +41,7 @@
static int do_addpart(int argc, char *argv[])
{
char *devname;
- char *endp;
+ const char *endp;
loff_t offset = 0;
loff_t devsize;
struct stat s;
@@ -70,7 +70,7 @@ static int do_addpart(int argc, char *argv[])
endp = argv[optind + 1];
while (1) {
- size_t size = 0;
+ loff_t size = 0;
if (cmdlinepart_do_parse_one(devname, endp, &endp, &offset,
devsize, &size, flags))