From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMOKx-0003Xh-Vo for qemu-devel@nongnu.org; Thu, 11 Oct 2012 15:22:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TMOKw-0001XN-Pt for qemu-devel@nongnu.org; Thu, 11 Oct 2012 15:22:27 -0400 Received: from mail-da0-f45.google.com ([209.85.210.45]:35409) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMOKw-0001XJ-KF for qemu-devel@nongnu.org; Thu, 11 Oct 2012 15:22:26 -0400 Received: by mail-da0-f45.google.com with SMTP id n15so915045dad.4 for ; Thu, 11 Oct 2012 12:22:25 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Thu, 11 Oct 2012 12:22:12 -0700 Message-Id: <1349983336-9974-3-git-send-email-rth@twiddle.net> In-Reply-To: <1349983336-9974-1-git-send-email-rth@twiddle.net> References: <1349983336-9974-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH 2/6] linux-user: Implement gethostname List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Riku Voipio Signed-off-by: Richard Henderson --- linux-user/syscall.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 8708b31..462d11b 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -8864,6 +8864,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