From patchwork Tue Jun 17 14:56:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 32042 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 484E6206A0 for ; Tue, 17 Jun 2014 15:03:25 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id t59sf32568230yho.2 for ; Tue, 17 Jun 2014 08:03:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:in-reply-to:references:cc:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=YVBj4iooaglzxOKmh0iQCFaNPRtJBHEygyii2UYGzD4=; b=ahU4EAk+Ct/bYcwMOVIc8c6efuvFf0qtb13Xc4IlYww6NMYhvn+L4yPCK+utMnQAMh C4iiOeHre/Bf83xUJ3WBv0bVY3HbQWMeHtQbX65HqMhD1Vy7ydPuNFrqWvwswGxTujDG 0H4pMhCs30Z+dGHUqtjiqqoksNt1uBxNPZCTG/tFd/PdvQdFCnO41jIR3OxJQRbHAdwh Zgbuea7gg+UILq0SwknrsA6PAaKwEsDuhzUNLLgS1rzA7s5mYxKrcrgawhi9YLI5m/u7 5lXKZvyT7M6TP9tWO2Gi8sVf/QDgTXHuJBCmcFQT/kzmNiXgQe/4r36odzUQ1H88aCKA C9mA== X-Gm-Message-State: ALoCoQncG2aNRXn9k6/oLEaUiGOWDWDDq3dzzbDaGpN8N32urjnqVDx2Ny7y20MJmqP8bUwSEC40 X-Received: by 10.58.119.100 with SMTP id kt4mr3274490veb.42.1403017404930; Tue, 17 Jun 2014 08:03:24 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.24.181 with SMTP id 50ls4862830qgr.92.gmail; Tue, 17 Jun 2014 08:03:24 -0700 (PDT) X-Received: by 10.220.9.201 with SMTP id m9mr22277734vcm.5.1403017404553; Tue, 17 Jun 2014 08:03:24 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id lv1si5571687vcb.85.2014.06.17.08.03.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Jun 2014 08:03:24 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.175 as permitted sender) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id jx11so4908861veb.20 for ; Tue, 17 Jun 2014 08:03:24 -0700 (PDT) X-Received: by 10.58.195.234 with SMTP id ih10mr1517401vec.41.1403017404479; Tue, 17 Jun 2014 08:03:24 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp216103vcb; Tue, 17 Jun 2014 08:03:23 -0700 (PDT) X-Received: by 10.140.37.138 with SMTP id r10mr34823668qgr.61.1403017403835; Tue, 17 Jun 2014 08:03:23 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id bq4si16597908qcb.34.2014.06.17.08.03.23 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 17 Jun 2014 08:03:23 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:51192 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wwuux-0006gm-EA for patch@linaro.org; Tue, 17 Jun 2014 11:03:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wwuoy-0005hV-V7 for qemu-devel@nongnu.org; Tue, 17 Jun 2014 10:57:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wwuos-0004Qe-Ad for qemu-devel@nongnu.org; Tue, 17 Jun 2014 10:57:12 -0400 Received: from [2001:4b98:dc0:45:216:3eff:fe3d:166f] (port=33151 helo=afflict.kos.to) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wwuos-0004P9-4j for qemu-devel@nongnu.org; Tue, 17 Jun 2014 10:57:06 -0400 Received: from afflict.kos.to (afflict [92.243.29.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id F2C042658D; Tue, 17 Jun 2014 16:57:03 +0200 (CEST) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Tue, 17 Jun 2014 17:56:59 +0300 Message-Id: <480eda2eda7c464e252f17ac87ec61bccc14f285.1403016610.git.riku.voipio@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 2001:4b98:dc0:45:216:3eff:fe3d:166f Cc: peter.maydell@linaro.org, Ed Swierk Subject: [Qemu-devel] [PULL v2 16/17] linux-user: Return correct errno for unsupported netlink socket 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: riku.voipio@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Ed Swierk This fixes "Cannot open audit interface - aborting." when the EAFNOSUPPORT errno differs between the target and host architectures (e.g. mips target and x86_64 host). Signed-off-by: Ed Swierk Signed-off-by: Riku Voipio --- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 840ced1..c134c32 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1856,7 +1856,7 @@ static abi_long do_socket(int domain, int type, int protocol) } if (domain == PF_NETLINK) - return -EAFNOSUPPORT; /* do not NETLINK socket connections possible */ + return -TARGET_EAFNOSUPPORT; ret = get_errno(socket(domain, type, protocol)); if (ret >= 0) { ret = sock_flags_fixup(ret, target_type);