[PATCH] [MTD-UTILS] Bad block handling in nandwrite when reading from standard input

Jehan Bing jehan at orb.com
Tue Jun 9 13:15:41 EDT 2009


Artem Bityutskiy wrote:
> On Mon, 2009-06-08 at 15:32 -0700, Jehan Bing wrote:
>   
>> Nandwrite tries to use lseek() when failing to write on a page. lseek() will fail when used on the standard input so nandwrite fails. This code replaces lseek with a buffer.
>>
>> When the data is read, it is put in a buffer (filebuf). This buffer is reset at each block boundary. So a "seek" just means reading from the beginning of the buffer. writebuf and oobreadbuf are now just pointers to locations in filebuf.
>>
>> With this change, reading from stdin or from a file now uses the same code path.
>>
>>
>> Signed-off-by: Jehan Bing <jehan at orb.com>
>
> Too large patch for me to review. Could you split it on few smaller
> ones please?
>   

Ok, I'll see what I can do.


> Also, please, do not send e-mails with
>  looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong
> lines. Please, wrap them to 78 characters. You'll make it then
> easier for other people to deal with you. Let's be nice.
>   

Sorry, I'm still trying to find the correct configuration for my mailer. 
I followed the instruction in the email-clients documentation but that 
broke things for me.
Hopefully this one will work better.




More information about the linux-mtd mailing list