mtd_debug usage

Ricard Wanderlof ricard.wanderlof at axis.com
Wed Nov 22 09:46:52 EST 2006


On Wed, 22 Nov 2006, Duke wrote:

>> What does  ls -l /dev/mtd*  (and ls -l /dev/mtdblock*) say?
>
> It looks like this:
>
> crw-r--r--    1 root     root      90,   0 Mar 22  2005 /dev/mtd0
> crw-r--r--    1 root     root      90,   1 Mar 22  2005 /dev/mtd1
> crw-r--r--    1 root     root      90,   2 Mar 22  2005 /dev/mtd2
> crw-r--r--    1 root     root      90,   3 Mar 22  2005 /dev/mtd3
> crw-r--r--    1 root     root      90,   4 Nov 22  2006 /dev/mtd4
> brw-r--r--    1 root     root      31,   0 Mar 22  2005 /dev/mtdblock0
> brw-r--r--    1 root     root      31,   1 Mar 22  2005 /dev/mtdblock1
> brw-r--r--    1 root     root      31,   2 Mar 22  2005 /dev/mtdblock2
> brw-r--r--    1 root     root      31,   3 Mar 22  2005 /dev/mtdblock3
> brw-r--r--    1 root     root      31,   4 Nov 22  2006 /dev/mtdblock4
>

The minor numbers for /dev/mtdX are wrong. /dev/mtd0 should have a minor 
no. of 0, /dev/mtd1 should have 2, /dev/mtd2 should have 4 etc. The 
odd-numbered minor numbers are intended for read-only devices.

The numbers for the block devices however are correct. (Don't know why 
the numbering scheme is not the same as for the character devices but that 
seems to be the way it is.)

/Ricard
--
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30




More information about the linux-mtd mailing list