[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 04/11] linux-user: Implement gethostname
From: |
riku . voipio |
Subject: |
[Qemu-devel] [PATCH 04/11] linux-user: Implement gethostname |
Date: |
Thu, 18 Oct 2012 14:31:00 +0300 |
From: Richard Henderson <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
linux-user/syscall.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 038aefe..89c74ad 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -8868,6 +8868,19 @@ abi_long do_syscall(void *cpu_env, int num, abi_long
arg1,
break;
}
#endif
+#ifdef TARGET_NR_gethostname
+ case TARGET_NR_gethostname:
+ {
+ char *name = lock_user(VERIFY_WRITE, arg1, arg2, 0);
+ if (name) {
+ ret = get_errno(gethostname(name, arg2));
+ unlock_user(name, arg1, arg2);
+ } else {
+ ret = -TARGET_EFAULT;
+ }
+ break;
+ }
+#endif
default:
unimplemented:
gemu_log("qemu: Unsupported syscall: %d\n", num);
--
1.7.9.5
- [Qemu-devel] [PULL] [PATCH 00/11] Pending linux-user patches, riku . voipio, 2012/10/18
- [Qemu-devel] [PATCH 04/11] linux-user: Implement gethostname,
riku . voipio <=
- [Qemu-devel] [PATCH 01/11] linux-user: fix statfs, riku . voipio, 2012/10/18
- [Qemu-devel] [PATCH 09/11] tcg: Remove TCG_TARGET_HAS_GUEST_BASE define, riku . voipio, 2012/10/18
- [Qemu-devel] [PATCH 02/11] linux-user: fix multi-threaded /proc/self/maps, riku . voipio, 2012/10/18
- [Qemu-devel] [PATCH 05/11] alpha-linux-user: Fix sigaltstack structure definition, riku . voipio, 2012/10/18
- [Qemu-devel] [PATCH 11/11] linux-user: register align p{read, write}64, riku . voipio, 2012/10/18
- [Qemu-devel] [PATCH 07/11] linux-user: If loading fails, print error as string, not number, riku . voipio, 2012/10/18
- [Qemu-devel] [PATCH 10/11] linux-user: ppc: mark as long long aligned, riku . voipio, 2012/10/18
- [Qemu-devel] [PATCH 03/11] linux-user: Perform more checks on iovec lists, riku . voipio, 2012/10/18
- [Qemu-devel] [PATCH 08/11] configure: Remove unnecessary host_guest_base code, riku . voipio, 2012/10/18
- [Qemu-devel] [PATCH 06/11] linux-user: Fix siginfo handling, riku . voipio, 2012/10/18