[PATCH] mtd: nand: print erase size on init

Brian Norris computersforpeace at gmail.com
Tue Nov 25 19:02:50 PST 2014


On Sat, Nov 22, 2014 at 09:51:03PM -0300, Ezequiel Garcia wrote:
> On 10/30/2014 09:35 AM, Rafał Miłecki wrote:
> > On 30 October 2014 08:33, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
> >> On Wed, 2014-10-22 at 19:48 -0300, Ezequiel Garcia wrote:
> >>> Moreover, you have a /proc and a /sysfs interface to retrieve the erasesize:
> >>>
> >>> What's wrong with using any of the currently available interfaces:
> >>>
> >>> $ cat /sys/class/mtd/mtd0/erasesize
> >>> 131072
> >>>
> >>> $ cat /proc/mtd | grep mtd0 | awk '{print $3}'
> >>> 00020000
> >>>
> >>> Any reason why you want the info in the kernel log?
> >>
> >> When people ask for help and send their logs, it is very handy to have
> >> this information there.
> > 
> > Oops, forgot to reply. There are two reasons for this:
> > 1) It's easier to get erasesize from users/reporters when it simply
> > appears in the boot log.
> > 2) If user space breaks (e.g. because of wrong UBI image) we can't use
> > "cat" to read the erasesize
> > 
> 
> Hm.. OK. Those sound like good reasons.

Glad we can agree on this important issue :)

Pushed to l2-mtd.git.

Brian



More information about the linux-mtd mailing list