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

Rafał Miłecki zajec5 at gmail.com
Thu Oct 30 05:35:08 PDT 2014


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

-- 
Rafał



More information about the linux-mtd mailing list