9
0
Fork 0
Commit Graph

2 Commits

Author SHA1 Message Date
Andrey Smirnov 8f8f14f9b6 fs: smhfs: Fix return value of truncate()
Returning -ENOSYS as a result of truncate() breaks ability to write to
semihosting host's filesystem, so change the return value to 0. This
shouldn't cause any problems since all of the funcionlaity of
truncate() should is already handled by 'open' (via O_TRUNC) and
'write' (will automatically grow the file size when writing)
automatically

Unfortunately this was missed in original commit that introduced
semihosting

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-09 07:17:57 +01:00
Andrey Smirnov 48d6151029 ARM: Add support for semihosting
Add semihosting API implementation and implement a filesystem driver
to access debugging host filesystem using it.

Tested on Freescale SabreSD board (i.MX6Q) using OpenOCD

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-30 08:06:03 +01:00