[PATCH] cmd line partitions: use 64 bit variables to detect partitions/offsets larger than 4G.

Artem Bityutskiy dedekind1 at gmail.com
Wed Sep 8 04:31:26 EDT 2010


On Tue, 2010-09-07 at 12:48 +0300, Saeed Bishara wrote:
> Signed-off-by: Saeed Bishara <saeed at marvell.com>
> ---
>  drivers/mtd/cmdlinepart.c |   12 ++++++------
>  1 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c
> index 1479da6..80036d1 100644
> --- a/drivers/mtd/cmdlinepart.c
> +++ b/drivers/mtd/cmdlinepart.c
> @@ -41,8 +41,8 @@
>  
> 
>  /* special size referring to all the remaining space in a partition */
> -#define SIZE_REMAINING UINT_MAX
> -#define OFFSET_CONTINUOUS UINT_MAX
> +#define SIZE_REMAINING LLONG_MAX
> +#define OFFSET_CONTINUOUS LLONG_MAX

Should be ULLONG_MAX since you use unsigned long long and also offsets
in 'struct mtd_partition' uses uint64_t.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)




More information about the linux-mtd mailing list