mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
semihosting: Split out semihost_sys_open
Split out the non-ARM specific portions of SYS_OPEN to a reusable function. This handles gdb and host file i/o. Add helpers to validate the length of the filename string. Prepare for usage by other semihosting by allowing the filename length parameter to be 0, and calling strlen. Reviewed-by: Luc Michel <lmichel@kalray.eu> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
3753b00e57
commit
5b3f39cb04
5 changed files with 194 additions and 46 deletions
|
@ -11,6 +11,11 @@
|
|||
#include "qemu/osdep.h"
|
||||
#include "exec/gdbstub.h"
|
||||
#include "semihosting/guestfd.h"
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
#include "qemu.h"
|
||||
#else
|
||||
#include "semihosting/softmmu-uaccess.h"
|
||||
#endif
|
||||
|
||||
static GArray *guestfd_array;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue