summaryrefslogtreecommitdiffstats
path: root/commands/partition.c
diff options
context:
space:
mode:
authorDmitry Lavnikevich <d.lavnikevich@sam-solutions.com>2014-03-10 14:39:50 +0300
committerSascha Hauer <s.hauer@pengutronix.de>2014-03-12 21:26:37 +0100
commit76a88c0227a74c48828b8d307f0afab2b2537aec (patch)
treec8da157f51b80e838097c1d18e1ada3fe27b3333 /commands/partition.c
parent1ee640765a71a7b9ee2cf4ebad22ed5961aef8db (diff)
downloadbarebox-76a88c0227a74c48828b8d307f0afab2b2537aec.tar.gz
barebox-76a88c0227a74c48828b8d307f0afab2b2537aec.tar.xz
mtd: Support for 4GB partitions
This patch implements correct way of creating partitions on mtd devices with size >= 4GB. Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com> Signed-off-by: Grigory Milev <g.milev@sam-solutions.com> 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 f8257222a9..44b91d1a13 100644
--- a/commands/partition.c
+++ b/commands/partition.c
@@ -59,11 +59,11 @@ static int mtd_part_do_parse_one(char *devname, const char *partstr,
size = SIZE_REMAINING;
end = (char *)partstr + 1;
} else {
- size = strtoul_suffix(partstr, &end, 0);
+ size = strtoull_suffix(partstr, &end, 0);
}
if (*end == '@')
- *offset = strtoul_suffix(end+1, &end, 0);
+ *offset = strtoull_suffix(end+1, &end, 0);
if (size == SIZE_REMAINING)
size = devsize - *offset;