From nobody Mon Feb 9 05:45:14 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=crudebyte.com ARC-Seal: i=1; a=rsa-sha256; t=1646400138; cv=none; d=zohomail.com; s=zohoarc; b=V+jPL1UGcxMOdWBS+v2Hbm7e7VPPiebOxF8WFqjSUdbeBjKmFUsYU/6GCyvIuolZepK5Sb9hn4+19xEz/8XiFOWnlJSQww8P/qdfw9VG2/zjfY8hqYEYT4GqkvIZUGaUlVEFCwnneWq/+nKJ8SVM296uxOIBUo8FqCQuz0KZqj4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1646400138; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KO3uCcDtoP8ypvHqVZeogjqwQxCYF7uWlWLOucj+apQ=; b=YiedNxG9ylOud5qbUeKkeZOs5pi8Tg/o/xvOLfwShBnAGO/pHKwTkHv9PnQBwZ/gcjW1ugA8chAQz9JhQeefPiix3fn4zotkYe3hMYcqom5PJ/IfBUQzeep/qvh5wxkGbiMzjP0mrwBbFOv1zu+LqWNQndy16qMTzQ/hnEAbVm0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 164640013809244.620359973119434; Fri, 4 Mar 2022 05:22:18 -0800 (PST) Received: from localhost ([::1]:54866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nQ7su-0005Uq-OU for importer@patchew.org; Fri, 04 Mar 2022 08:22:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <9bca156323feb554c2eb54aa3888a4445666437b@lizzy.crudebyte.com>) id 1nQ7lt-0000lP-5P for qemu-devel@nongnu.org; Fri, 04 Mar 2022 08:15:02 -0500 Received: from lizzy.crudebyte.com ([91.194.90.13]:49909) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <9bca156323feb554c2eb54aa3888a4445666437b@lizzy.crudebyte.com>) id 1nQ7lr-000667-FH for qemu-devel@nongnu.org; Fri, 04 Mar 2022 08:15:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=crudebyte.com; s=lizzy; h=Cc:To:Content-Transfer-Encoding:Content-Type: MIME-Version:Subject:Date:From:References:In-Reply-To:Message-Id:Content-ID: Content-Description; bh=KO3uCcDtoP8ypvHqVZeogjqwQxCYF7uWlWLOucj+apQ=; b=PQG1q E4KgRSngS09ShDII/fCbrzpF6fTn/eAcusTM/YRBvgaihmEgJxHTuCxbkaw2R06hnZV6MvlUX6K0y vNSnl4h5mshCLoaWr/fbtNgtxnjBCG0iJ2U4pUY8bZFbm6OE4PoWfm54wp2N9YWQa0FIrIlLiDTvF 8+tSOvvGwNyvZfHfxvXVDQrimkzvMSo8Yyy7KwfTttEBUi2D3YFuv9pt63PdEBkzl2gTP/sGjrMRT Hlf4DVT0WXjE8mnQzTBn31gbZgsV3L2cC9Q6DZDXqdiwNTv9rUh9BDw/mugogNKWlrfBNipgsI1uj enOqpJdAxtnL4zMmdUVBwaBmGXj0w==; Message-Id: <9bca156323feb554c2eb54aa3888a4445666437b.1646396869.git.qemu_oss@crudebyte.com> In-Reply-To: References: From: Christian Schoenebeck Date: Fri, 04 Mar 2022 13:27:49 +0100 Subject: [PULL 01/19] 9p: linux: Fix a couple Linux assumptions MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org, Peter Maydell Cc: Greg Kurz Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=91.194.90.13; envelope-from=9bca156323feb554c2eb54aa3888a4445666437b@lizzy.crudebyte.com; helo=lizzy.crudebyte.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @crudebyte.com) X-ZM-MESSAGEID: 1646400138744100001 From: Keno Fischer - Guard Linux only headers. - Add qemu/statfs.h header to abstract over the which headers are needed for struct statfs - Define `ENOATTR` only if not only defined (it's defined in system headers on Darwin). Signed-off-by: Keno Fischer [Michael Roitzsch: - Rebase for NixOS] Signed-off-by: Michael Roitzsch While it might at first appear that fsdev/virtfs-proxy-header.c would need similar adjustment for darwin as file-op-9p here, a later patch in this series disables virtfs-proxy-helper for non-Linux. Allowing virtfs-proxy-helper on darwin could potentially be an additional optimization later. [Will Cohen: - Fix headers for Alpine - Integrate statfs.h back into file-op-9p.h - Remove superfluous header guards from file-opt-9p - Add note about virtfs-proxy-helper being disabled on non-Linux for this patch series] Signed-off-by: Will Cohen Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Greg Kurz Message-Id: <20220227223522.91937-2-wwcohen@gmail.com> Signed-off-by: Christian Schoenebeck --- fsdev/file-op-9p.h | 9 ++++++++- hw/9pfs/9p-local.c | 2 ++ hw/9pfs/9p.c | 4 ++++ include/qemu/xattr.h | 4 +++- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/fsdev/file-op-9p.h b/fsdev/file-op-9p.h index 8fd89f0447..4997677460 100644 --- a/fsdev/file-op-9p.h +++ b/fsdev/file-op-9p.h @@ -16,10 +16,17 @@ =20 #include #include -#include #include "qemu-fsdev-throttle.h" #include "p9array.h" =20 +#ifdef CONFIG_LINUX +# include +#endif +#ifdef CONFIG_DARWIN +# include +# include +#endif + #define SM_LOCAL_MODE_BITS 0600 #define SM_LOCAL_DIR_MODE_BITS 0700 =20 diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c index 210d9e7705..1a5e3eed73 100644 --- a/hw/9pfs/9p-local.c +++ b/hw/9pfs/9p-local.c @@ -32,10 +32,12 @@ #include "qemu/error-report.h" #include "qemu/option.h" #include +#ifdef CONFIG_LINUX #include #ifdef CONFIG_LINUX_MAGIC_H #include #endif +#endif #include =20 #ifndef XFS_SUPER_MAGIC diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 15b3f4d385..9c63e14b28 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -32,7 +32,11 @@ #include "migration/blocker.h" #include "qemu/xxhash.h" #include +#ifdef CONFIG_LINUX #include +#else +#include +#endif =20 int open_fd_hw; int total_open_fd; diff --git a/include/qemu/xattr.h b/include/qemu/xattr.h index a83fe8e749..f1d0f7be74 100644 --- a/include/qemu/xattr.h +++ b/include/qemu/xattr.h @@ -22,7 +22,9 @@ #ifdef CONFIG_LIBATTR # include #else -# define ENOATTR ENODATA +# if !defined(ENOATTR) +# define ENOATTR ENODATA +# endif # include #endif =20 --=20 2.20.1