Skip to contentSkip to conversation

Bug in cmdlinepart.c?

DISCUSSION M8 (Servaes Joordens) 1 participant 1 message Sep 21, 2007 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Dear sirs,

I asked this question in the forum on blackfin.uclinux.org and the gave me this email addres to post my mail to.

In drivers/mtd/cmdlinepart.c there is the following piece of code:

if( strncmp(s, "ro", 2) == 0 )
{
mask_flags |= MTD_WRITEABLE;
s+=2;
}

Is this correct? When the partition is defined to be read-only (ro) the MTD_WRITEABLE flag is set? I guess this should be:

if( strncmp(s, "ro", 2) == 0 )
{
mask_flags &= (~MTD_WRITEABLE); // disable the writeability s+=2;
}else
{
mask_flags |= MTD_WRITEABLE; // enable the writeability }

I hope you can answer my question. Thanks in advance.

Servaes Joordens
M8

Signature · 13 lines
Servaes Joordens

-------------------------------------------
M8
Tappersweg 29
2031ET	Haarlem
The Netherlands
Tel:	+31 23 5311122
Mob:	+31 6 51183379
Fax:	+31 23 5322388

VAT-ID: nl-813029090B01
kvk:	34131430 Haarlem