X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fmtd%2Fcmdlinepart.c;h=a7a7bfe33879e0cc56bb07d25e4b23b7302b65f7;hb=3c693024cffa5c96a20b969f4efd058675e7700f;hp=6b8bb2e4dcfde7ca5dbf8cb6bd1f4abc13c78c6f;hpb=b3ce1debe2685383a9ad6ace9c49869c3968c013;p=powerpc.git diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c index 6b8bb2e4dc..a7a7bfe338 100644 --- a/drivers/mtd/cmdlinepart.c +++ b/drivers/mtd/cmdlinepart.c @@ -42,7 +42,8 @@ /* special size referring to all the remaining space in a partition */ -#define SIZE_REMAINING 0xffffffff +#define SIZE_REMAINING UINT_MAX +#define OFFSET_CONTINUOUS UINT_MAX struct cmdline_mtd_partition { struct cmdline_mtd_partition *next; @@ -75,7 +76,7 @@ static struct mtd_partition * newpart(char *s, { struct mtd_partition *parts; unsigned long size; - unsigned long offset = 0; + unsigned long offset = OFFSET_CONTINUOUS; char *name; int name_len; unsigned char *extra_mem; @@ -314,7 +315,7 @@ static int parse_cmdline_partitions(struct mtd_info *master, { for(i = 0, offset = 0; i < part->num_parts; i++) { - if (!part->parts[i].offset) + if (part->parts[i].offset == OFFSET_CONTINUOUS) part->parts[i].offset = offset; else offset = part->parts[i].offset;