diff options
Diffstat (limited to 'semihosting/arm-compat-semi.c')
-rw-r--r-- | semihosting/arm-compat-semi.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c index f4ce3851a4..14d37ac9da 100644 --- a/semihosting/arm-compat-semi.c +++ b/semihosting/arm-compat-semi.c @@ -492,26 +492,7 @@ void do_common_semihosting(CPUState *cs) GET_ARG(1); GET_ARG(2); GET_ARG(3); - if (use_gdb_syscalls()) { - gdb_do_syscall(common_semi_cb, "rename,%s,%s", - arg0, (int)arg1 + 1, arg2, (int)arg3 + 1); - } else { - char *s2; - - s = lock_user_string(arg0); - if (!s) { - goto do_fault; - } - s2 = lock_user_string(arg2); - if (!s2) { - unlock_user(s, arg0, 0); - goto do_fault; - } - ret = rename(s, s2); - unlock_user(s2, arg2, 0); - unlock_user(s, arg0, 0); - common_semi_cb(cs, ret, ret ? errno : 0); - } + semihost_sys_rename(cs, common_semi_cb, arg0, arg1 + 1, arg2, arg3 + 1); break; case TARGET_SYS_CLOCK: |