Proc stuff
Eric W. Biederman
ebiederman at lnxi.com
Thu Apr 5 16:09:42 EDT 2001
David Woodhouse <dwmw2 at infradead.org> writes:
> ian.nelson at echostar.com said:
> > Maybe the solution is to create a /proc/mtd directory and then have a
> > few different files in there which can either be generic or specific.
> > There are other places in the kernel that do this so it's un
> > unprecedented. /proc is nice and easy to read so you can build
> > scripts and simple things to read it. An ioctl could also work.
>
> /proc is nicer, if we really have to do it. How about /proc/driver/mtd/$n,
> each one containing something along the lines of...
>
> name: "blah"
> size: 0x1000000
> erasesize: 0x10000
>
> The standard lines can be provided by a generic function, and we add a
> proc_filler method to the mtd_info stucture which overrides that to allow
> you to do whatever else you want.
>
> Actually, mtdfs is probably nicer than adding yet more cruft to /proc.
Espeically in the context of embedded systems where sometimes you want
the option to compile out as much as you can. With /proc it is a
giant growing lump, with a mtdfs, you can include it if you need it.
Long term I think the tradeoff between a 256 line fstab for a million
in kernel filesystems you might need on a big server with everything,
versus 100+ mandatory kilobytes and growing for /proc is a good one.
Eric
To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org
More information about the linux-mtd
mailing list