From patchwork Sat Jun 6 13:15:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 11591173 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C647660D for ; Sat, 6 Jun 2020 13:16:52 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A7962206A2 for ; Sat, 6 Jun 2020 13:16:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A7962206A2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=vivier.eu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:59480 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jhYgt-0007en-Lj for patchwork-qemu-devel@patchwork.kernel.org; Sat, 06 Jun 2020 09:16:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhYfd-00062Y-GX for qemu-devel@nongnu.org; Sat, 06 Jun 2020 09:15:33 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:57249) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhYfZ-0007Zp-W7 for qemu-devel@nongnu.org; Sat, 06 Jun 2020 09:15:33 -0400 Received: from localhost.localdomain ([82.252.135.106]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1Mk0FS-1jErg11vJo-00kMKw; Sat, 06 Jun 2020 15:15:21 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL v2 02/19] linux-user: return target error codes for socket() and prctl() Date: Sat, 6 Jun 2020 15:15:00 +0200 Message-Id: <20200606131517.1250346-3-laurent@vivier.eu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200606131517.1250346-1-laurent@vivier.eu> References: <20200606131517.1250346-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:vSvE8yzZQ+/jhlqHLs9KtejW7Ampq8TfsPaedVkwpuOrylfQ2ER rGdcECFpZX6PonpreSaje50d1d2A4WTu8o92o4Lv8XRKFe4RQxhoQXxUJ7rdJlhX92IhQ3b l6I6BUtyuZGpSx8jPQvdd6IjKoRY2H+4qdF74hHTvm/4X2ckTfAQfLpQRaaQnHADkFCvkPZ vo7x4MpBUxCS3WwG9xO8g== X-UI-Out-Filterresults: notjunk:1;V03:K0:TdF/lp0OqK0=:0m599vtsLyEnGmlf618jMb bbdk49pW54bCL1VCs4H8GreIAMn3jBPesYGSRMTWcIhoS530hlQEJ+IZcoodKFDXu2DygsEGv bMGeErVTADBvxkkjyP2cOebaod75iv/eWHJpNkPlntpZFd6MyZ++WucQeEQKO2WrOwpL1CEx3 kseDFIXOJbZ2E0k4Qh4EI7dYHdSJUdYa5H9nxgSgWjnZKZvQ1FWwklvzNUOdqpvyhX5uP/Gri 3RHOt4nNfphToquST5KXSE0Sf+5QviTEPHPaAuQmQsUsrBwFWyaVqRBchAW4OfVPL6YdgoXWh +ZLb5R6EV0t90Y8WiheVx5mBqs/7Pi81PdmqQkOsHvg8PUFBv59iqo0DLkb08+enQfU1qOBWf 9mOYzt403yqdZ59QuyBEjFqZqF9VkOg0vlTXMBWgTI28b6SMN6xxXkObFh48zUt0pY6BSqJLe okBuYPg7pUceo92UPpyIDDCKv7+Mmom2l848pbxfzYrdlI2PvcjvKmyxhXOCEGNxdbW3c6SZz gligXTXOxn6XnvPtquUEdjH5FuUF4T0rOlndDZEoPMjqe1rmkhrJZHLjVYkr8qweHwwalXjrK tPjeaONamBwIM+km3HnhfY4hTg1gs84SDXvJFsEAux+Iz7jWxgpYTp4duL6GZfWaTxd1dRvWr 6iwSfX0sdmNFbYcI1DNTQPHttitDXw7qb7H/TupCW2+v2qVJjjmWpsdJ5whhWFSw2DQGaRM7g fSaA+af2bicQ0jDHm7YXjVdkoTbMIl02uTvocQHx5UFIUzNJ9/tFjKwNxxDmUR01rQAzZYE9o mRt78/clmgol9kMg2KN4P1YiuS6Ah8h+aXso2pN+9R/1uId9AFmMcFiOHOoLsh22fb4ZaCQ Received-SPF: none client-ip=212.227.17.13; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/06 09:15:28 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Helge Deller , Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Helge Deller Return target error codes instead of host error codes. Signed-off-by: Helge Deller Reviewed-by: Laurent Vivier Message-Id: <20200424220033.GA28140@ls3530.fritz.box> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index e89b815ce983..fd5c4f1d73e6 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2987,7 +2987,7 @@ static abi_long do_socket(int domain, int type, int protocol) #endif protocol == NETLINK_KOBJECT_UEVENT || protocol == NETLINK_AUDIT)) { - return -EPFNOSUPPORT; + return -TARGET_EPFNOSUPPORT; } if (domain == AF_PACKET || @@ -5856,7 +5856,7 @@ static abi_long do_get_thread_area(CPUX86State *env, abi_ulong ptr) abi_long do_arch_prctl(CPUX86State *env, int code, abi_ulong addr) { - return -ENOSYS; + return -TARGET_ENOSYS; } #else abi_long do_arch_prctl(CPUX86State *env, int code, abi_ulong addr)