[PATCH] fs: Fix memcpy_sz for remaining count/rwsize
Sebastian Hesselbarth
sebastian.hesselbarth at gmail.com
Tue Oct 13 01:09:35 PDT 2015
On 13.10.2015 10:00, Sascha Hauer wrote:
> On Mon, Oct 12, 2015 at 08:51:54PM +0200, Sebastian Hesselbarth wrote:
>> On 12.10.2015 09:36, Sebastian Hesselbarth wrote:
>> I used
>>
>> memcpy -s /mnt/image.img -d /dev/nand0.u-boot.bb 0 0
>>
>> i.e. I did not specify any rwsize option. Looking at the code,
>> mem_parse_options does initialize mode with 0 and memcpy_sz
>> should use plain memcpy as fallback.
>>
>> However, if I look at include/fcntl.h, I see that O_RWSIZE_8
>> collides with O_CREAT. I think that is the root cause of the
>> 64b memcpy_sz issue I am suffering from?
>
> Oh Damned! /me hiding under a brown paper bag.
>
> I don't know how you are calling memcpy_sz, but that could lead to
> these kind problems.
memcpy_sz is called by fs/fs.c when using memcpy command above.
Sebastian
More information about the barebox
mailing list