Subject: Re: [MTD] ofpart: Partitions at same address cannot have the same name

From: Peter Korsgaard <[email-masked]>
Date: Wed, 22 Apr 2009 11:24:01 +0200

>>>>> "Ricardo" == Ricardo Ribalda Delgado <[email-masked]> writes:

Hi,

 Ricardo> Sometimes, an special partition is included in the device
 Ricardo> tree including all the partitions. Like in:

 Ricardo>  drivers/mtd/ofpart.c |    3 ++-
 Ricardo>  1 files changed, 2 insertions(+), 1 deletions(-)

 Ricardo> diff --git a/drivers/mtd/ofpart.c b/drivers/mtd/ofpart.c
 Ricardo> index 3e164f0..0af3b07 100644
 Ricardo> --- a/drivers/mtd/ofpart.c
 Ricardo> +++ b/drivers/mtd/ofpart.c
 Ricardo> @@ -48,7 +48,8 @@ int __devinit of_mtd_parse_partitions(struct device *dev,
 
 Ricardo>  		/* check if this is a partition node */
 Ricardo>  		partname = of_get_property(pp, "name", &len);
 Ricardo> -		if (strcmp(partname, "partition") != 0) {
 Ricardo> +		if (strncmp(partname, "partition", strlen("partition")-1)

Why strlen() - 1 ?

-- 
Bye, Peter Korsgaard