I'll hold off on a bit to see if Brian sees my e-mail and has any ideas
Patch Set #4, Line 231:
Maybe there actually is an alignment requirement? In that case […]
strace showed the fread() working, but I didn't see it try to do the fwrite() after the fseek(). I'm not sure what that means, maybe fwrite() just doesn't work on certain types of files? I also tried adjusting chunksize, and reversing the size and nmemb args, but didn't have any luck there. So I sent an e-mail to one of the MTD maintainers (briannorris) in case he has any ideas.
(BTW - the error string I mentioned earlier might not be relevant since fwrite() doesn't set errno)
Since the MTD write-protect functions use a few ioctl()s, I think it would make more sense to convert from file descriptor --> stream in the cases where fread() can be used. Does that sound good?
To view, visit change 25706. To unsubscribe, or for help writing mail filters, visit settings.