MTD devices at the wrong place

Jörn Engel joern at wohnheim.fh-wedel.de
Fri Nov 1 17:53:19 EST 2002


On Fri, 1 November 2002 14:46:53 -0800, Eugene Surovegin wrote:
> >> /dev/mtd4 should be c 90 8
> >
> >Correction:
> >/dev/mtd4 *should be* c 90 4, but for historical reasons, it is c 90 8.
> 
> Well, maybe I missing something, but mtdchar.c:
> 
> static int mtd_open(struct inode *inode, struct file *file)
> {
>         int minor = MINOR(inode->i_rdev);
>         int devnum = minor >> 1;
>         struct mtd_info *mtd;
> 
> ....
> 
> Notice "minor >> 1".
> 
> As far as I understand, even numbers are used for rw access, odd - for ro.

Yes, that is the status quo. But that is not, how is *should be*,
merely how it *is*.
There is no point in the -ro devices, they only lead to
misunderstandings like the current one.

Jörn, trying to kill those bastards sind 9/01

-- 
"Security vulnerabilities are here to stay."
-- Scott Culp, Manager of the Microsoft Security Response Center, 2001




More information about the linux-mtd mailing list