O_CREAT and O_RWSIZE_8 are both defined as 0100. Fix this by moving the
O_RWSIZE_* flags to unused bits.
This bug leads to incomplete writes when the destination file is created
and mem_write is involved, for example with the memcpy command:
memcpy -s /some/file -d /dev/ram0 0 0 10
In this case only 8 bytes will be copied and it will be done using 8
byte accesses which may not work properly if the destination is not
sufficiently aligned, i.e.:
memcpy -s /some/file -d /dev/ram0 0 1 8
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reported-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>