[PATCH] [MTD-UTILS] Add support for 4KB page flash devices

Sergei Shtylyov sshtylyov at ru.mvista.com
Mon Sep 22 05:19:29 EDT 2008


Hello.

Kyungmin Park wrote:

>> We can now use these utilities on 4KB devices.
>>
>> Signed-off-by: Rohit Hagargundgi <h.rohit at samsung.com>
>> ---
>> --- a/flash_otp_write.c 2008-06-27 21:51:28.000000000 +0530
>> +++ b/flash_otp_write.c 2008-07-01 16:04:12.000000000 +0530
>> @@ -18,7 +18,7 @@ int main(int argc,char *argv[])
>>        int fd, val, ret, size, wrote, len;
>>        mtd_info_t mtdInfo;
>>        off_t offset;
>> -       char *p, buf[2048];
>> +       char *p, buf[4096];
>>
>>     
>
> Is it no problem the stack overflow in application?
> How about to use malloc & free?
>   

   Come on, it's only an extra page of stack for a non-recursive 
function -- this shouldn't pose any danger.

WBR, Sergei





More information about the linux-mtd mailing list