Finding flash type...

Josh Boyer jwboyer at linux.vnet.ibm.com
Tue Dec 5 21:05:53 EST 2006


On Tue, 2006-12-05 at 17:44 -0800, Siddharth Choudhuri wrote:
> --- Artem Bityutskiy <dedekind at infradead.org> wrote:
> > It would be ideal if somebody added sysfs support to
> > MTD. Then you could
> > just look at sysfs and find it out. Now you should
> > use ioctl's.
> >
> I could start adding the sysfs support to reflect
> flash type.  I have the following questions though:
> 
> 1. Should the information be exported in the
> /sys/block/mtd* directory ? The other place would be
> /sys/class/mtd*.

/sys/class/mtd would be preferable.  MTD isn't a block driver, so it
doesn't really belong under block.

> 2. Should any other information be also exported ? The
> mtd_info_user structure [include/mtd-abi.h] has
> additional fields that might be useful - size,
> erasesize, oobblock(if present) ?

Yes, most of mtd_info_user would be good to export.

josh





More information about the linux-mtd mailing list