From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCyua-00076k-1H for qemu-devel@nongnu.org; Sat, 15 Sep 2012 16:24:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCyuY-0004gR-5O for qemu-devel@nongnu.org; Sat, 15 Sep 2012 16:24:19 -0400 Received: from mail-pz0-f45.google.com ([209.85.210.45]:37441) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCyuX-0004gA-VF for qemu-devel@nongnu.org; Sat, 15 Sep 2012 16:24:18 -0400 Received: by dadn15 with SMTP id n15so3318847dad.4 for ; Sat, 15 Sep 2012 13:24:17 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Sat, 15 Sep 2012 13:24:05 -0700 Message-Id: <1347740649-28646-3-git-send-email-rth@twiddle.net> In-Reply-To: <1347740649-28646-1-git-send-email-rth@twiddle.net> References: <1347740649-28646-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 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