[PATCH] mtd: nand: print erase size on init
Ezequiel Garcia
ezequiel at vanguardiasur.com.ar
Sat Nov 22 16:51:03 PST 2014
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.
--
Ezequiel Garcia, VanguardiaSur
www.vanguardiasur.com.ar
More information about the linux-mtd
mailing list