From patchwork Wed Jul 13 14:48:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 104541 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C5E1BB6F62 for ; Thu, 14 Jul 2011 01:30:59 +1000 (EST) Received: from localhost ([::1]:54298 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qh1Op-0000aG-Ks for incoming@patchwork.ozlabs.org; Wed, 13 Jul 2011 11:30:55 -0400 Received: from eggs.gnu.org ([140.186.70.92]:43953) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qh0ke-0006ek-RJ for qemu-devel@nongnu.org; Wed, 13 Jul 2011 10:49:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qh0ka-0007tM-B2 for qemu-devel@nongnu.org; Wed, 13 Jul 2011 10:49:24 -0400 Received: from afflict.kos.to ([92.243.29.197]:47348) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qh0kZ-0007tB-UN for qemu-devel@nongnu.org; Wed, 13 Jul 2011 10:49:20 -0400 Received: from kos.to (a88-115-163-181.elisa-laajakaista.fi [88.115.163.181]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id 1A85C2669B; Wed, 13 Jul 2011 14:49:18 +0000 (UTC) Received: by kos.to (sSMTP sendmail emulation); Wed, 13 Jul 2011 17:49:17 +0300 From: riku.voipio@iki.fi To: qemu-devel@nongnu.org Date: Wed, 13 Jul 2011 17:48:48 +0300 Message-Id: <7c2f6157d833cb95b355c7321597bc5a5ac976e4.1310568214.git.riku.voipio@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 92.243.29.197 Cc: "Wesley W. Terpstra" Subject: [Qemu-devel] [PATCH 09/15] mips: missing syscall returns wrong errno X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Wesley W. Terpstra Return -TARGET_ENOSYS instead of -ENOSYS from linux-user/main.c * Caused strange 'Level 2 synchronization messages' instead of correctly reporting the syscall was missing. * Made glibc simply fail instead of using older syscalls Signed-off-by: Riku Voipio Signed-off-by: Wesley W. Terpstra --- linux-user/main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index d695610..e32f987 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -2080,7 +2080,7 @@ void cpu_loop(CPUMIPSState *env) syscall_num = env->active_tc.gpr[2] - 4000; env->active_tc.PC += 4; if (syscall_num >= sizeof(mips_syscall_args)) { - ret = -ENOSYS; + ret = -TARGET_ENOSYS; } else { int nb_args; abi_ulong sp_reg;