Received: from eggs.gnu.org ([208.118.235.92]:54806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF42s-0000Aj-Hu for qemu-devel@nongnu.org; Fri, 21 Sep 2012 10:17:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TF42m-0002h9-CS for qemu-devel@nongnu.org; Fri, 21 Sep 2012 10:17:30 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:57956) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF42m-0002gX-6X for qemu-devel@nongnu.org; Fri, 21 Sep 2012 10:17:24 -0400 Received: by mail-pb0-f45.google.com with SMTP id rp12so7780255pbb.4 for ; Fri, 21 Sep 2012 07:17:23 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Fri, 21 Sep 2012 07:17:10 -0700 Message-Id: <1348237034-15851-3-git-send-email-rth@twiddle.net> In-Reply-To: <1348237034-15851-1-git-send-email-rth@twiddle.net> References: <1348237034-15851-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