Skip to contentSkip to conversation

RO permission on odd numbered MTD devices?

DISCUSSION Mike Hill 2 participants 2 messages Sep 19, 2001 Memory technology devices (MTD)

lore
Share & tools
lore

Mike Hill

author
#0 lore raw

Can anyone tell me why the odd numbered MTD character devices are ReadOnly?

I see the code in MTDCHAR.C, but I have no idea what it was setup this way.

/* You can't open the RO devices RW */
if ((file->f_mode & 2) && (minor & 1))
return -EACCES;

Thanks for any understanding you can provide...
-Mike

===========================================
Michael Hill - Systems Developer

Bus-Tech, Inc.
Email: [email protected]
Phone: (919) 847-7859 Fax: (919) 847-0182
===========================================

Say "boolah boolah boolah" out loud three times,
wave a dead chicken, and reboot.
Works for me...

#1 lore raw
Quoted 5 lines · [email protected] said:

Can anyone tell me why the odd numbered MTD character devices are ReadOnly?

I see the code in MTDCHAR.C, but I have no idea what it was setup this way.

grep --context=3 mtdr0 /usr/src/linux/Documentation/devices.txt

--
dwmw2