9
0
Fork 0
Commit Graph

6 Commits

Author SHA1 Message Date
Sascha Hauer 70bbeea7b2 fs: move libc function prototypes to their correct locations
This moves the function prototypes in include/fs.h which also exist
in the libc to the locations they would have in libc.

With this it becomes easier to share code between barebox and userspace
since the usual libc include files will exist. Also users of the libc
functions no longer have to include the barebox internal fs.h header.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-04-15 12:21:45 +02:00
Sascha Hauer ed395e4df1 fcntl: Fix O_CREAT clashing with O_RWSIZE_8
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>
2015-11-04 09:31:02 +01:00
Sascha Hauer 0228ccccdd fs: Add O_RWSIZE_8
To support native 64bit accesses in memcpy_sz.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-28 12:29:49 +02:00
Sascha Hauer a3ffa97f40 rename U-Boot-v2 project to barebox
This has been done with the following script:

find -path ./.git -prune -o -type f -print0 | xargs -0 -r sed -i \
	-e 's/u2boot/barebox/g' \
	-e 's/U2Boot/barebox/g' \
	-e 's/U-boot V2/barebox/g' \
	-e 's/u-boot v2/barebox/g' \
	-e 's/U-Boot V2/barebox/g' \
	-e 's/U-Boot-v2/barebox/g' \
	-e 's/U_BOOT/BAREBOX/g' \
	-e 's/UBOOT/BAREBOX/g' \
	-e 's/uboot/barebox/g' \
	-e 's/u-boot/barebox/g' \
	-e 's/u_boot/barebox/g' \
	-e 's/U-Boot/barebox/g' \
	-e 's/U-boot/barebox/g' \
	-e 's/U-BOOT/barebox/g'

find -path ./.git -prune -o \( -name "*u-boot*" -o -name "*uboot*" -o -name "*u_boot*" \) -print0 | \
	xargs -0 -r rename 's/u[-_]?boot/barebox/'

It needs some manual fixup following in the next patch

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-15 10:18:30 +01:00
Sascha Hauer 4cfbef6dd6 svn_rev_292
remove flags we will never use, add flags for rwsize
2007-07-05 18:01:40 +02:00
Sascha Hauer 189579188b svn_rev_271 2007-07-05 18:01:38 +02:00