[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/6] linux-user: Implement gethostname
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 2/6] linux-user: Implement gethostname |
Date: |
Fri, 21 Sep 2012 07:17:10 -0700 |
Signed-off-by: Richard Henderson <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 ceca04c..925e579 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -8866,6 +8866,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.11.4
- [Qemu-devel] [PATCH v2 0/6] linux-user improvements, Richard Henderson, 2012/09/21
- [Qemu-devel] [PATCH 2/6] linux-user: Implement gethostname,
Richard Henderson <=
- [Qemu-devel] [PATCH 1/6] linux-user: Perform more checks on iovec lists, Richard Henderson, 2012/09/21
- [Qemu-devel] [PATCH 4/6] alpha-linux-user: Fix sigaction, Richard Henderson, 2012/09/21
- [Qemu-devel] [PATCH 3/6] alpha-linux-user: Fix sigaltstack structure definition, Richard Henderson, 2012/09/21
- [Qemu-devel] [PATCH 5/6] target-alpha: Fix cpu_alpha_init, Richard Henderson, 2012/09/21
- [Qemu-devel] [PATCH 6/6] linux-user: Fix siginfo handling, Richard Henderson, 2012/09/21
- Re: [Qemu-devel] [PATCH v2 0/6] linux-user improvements, Andreas Färber, 2012/09/21