From patchwork Mon Jun 9 12:46:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 31546 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f71.google.com (mail-pa0-f71.google.com [209.85.220.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 861A020675 for ; Mon, 9 Jun 2014 12:48:06 +0000 (UTC) Received: by mail-pa0-f71.google.com with SMTP id bj1sf3135574pad.10 for ; Mon, 09 Jun 2014 05:48:05 -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: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=XyIzuzRK1rIgppN9F+IdwtwfwDO+UVE4m99SGFdxL7iXzTeXYPs8ZM0VaoQnI/A2dH Jn9sZsjtJcrGvzFp7hKbrf8TQN1V8l/g/6L99V/F51BI22jPA9PzOh8eJZHEj7sjTe6T SrgMp38gNcKkNbaamcz5qUDBeSEjhWxZEA21S8kP+pnwoVuXaKB0Fd3DowgRAA++xufO h1dpI7nSbUP8zKp38Nn77wxcOayyg9EtDZ2ZXMdbLrAccLvX8Url40UB6+pJjkZYV1on hi2X+ST6K1/FZ4fYULeA5OQ4da9L+HvzG+LsoNhsmKFbFfCSLSzQrml6G7isuFFifHop hv6A== X-Gm-Message-State: ALoCoQn1YMVoYY36rJazaifFFqn03qmhdEg2KCBMvciTS/rEYj84x2VFoJeXpoyBA5HofLjcDuv2 X-Received: by 10.66.169.231 with SMTP id ah7mr1978230pac.40.1402318085857; Mon, 09 Jun 2014 05:48:05 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.40.209 with SMTP id x75ls1609296qgx.46.gmail; Mon, 09 Jun 2014 05:48:05 -0700 (PDT) X-Received: by 10.58.38.34 with SMTP id d2mr1003108vek.58.1402318085707; Mon, 09 Jun 2014 05:48:05 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id n9si10554896vcx.91.2014.06.09.05.48.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 09 Jun 2014 05:48:05 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id il7so6194818vcb.13 for ; Mon, 09 Jun 2014 05:48:05 -0700 (PDT) X-Received: by 10.221.26.10 with SMTP id rk10mr26127927vcb.0.1402318085635; Mon, 09 Jun 2014 05:48:05 -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 vs6csp143294vcb; Mon, 9 Jun 2014 05:48:04 -0700 (PDT) X-Received: by 10.224.21.1 with SMTP id h1mr3068007qab.103.1402318083708; Mon, 09 Jun 2014 05:48:03 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id p16si23519544qax.121.2014.06.09.05.48.03 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 09 Jun 2014 05:48:03 -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]:60842 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wtyzb-0006fT-D7 for patch@linaro.org; Mon, 09 Jun 2014 08:48:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44891) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WtyyT-0005cJ-9S for qemu-devel@nongnu.org; Mon, 09 Jun 2014 08:46:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WtyyN-0007hk-9E for qemu-devel@nongnu.org; Mon, 09 Jun 2014 08:46:53 -0400 Received: from [2001:4b98:dc0:45:216:3eff:fe3d:166f] (port=55291 helo=afflict.kos.to) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WtyyN-0007gU-38 for qemu-devel@nongnu.org; Mon, 09 Jun 2014 08:46:47 -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 5883926595; Mon, 9 Jun 2014 14:46:45 +0200 (CEST) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Mon, 9 Jun 2014 15:46:42 +0300 Message-Id: <4b4d97303075e77471e11c1d28e085af0358e7e9.1402317549.git.riku.voipio@linaro.org> X-Mailer: git-send-email 1.7.10.4 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 17/18] 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.220.182 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);