From nobody Tue Nov 18 04:31:17 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1607977734; cv=none; d=zohomail.com; s=zohoarc; b=SxNuuYREKidF9kDbwkOZwmiB2yBEzkEqs/A79OxcC2jlnPJszRt70A0LKZj0Jjlcmu6XEs6ENKmnUsCnajrcYon03hr1WM2WzOrOeKavKNErYejTALPwcyOvWMGeXPPaO5RQEfEM+434h8lIUyFLIPqBhmA/ih9A7KyAA/XSxtY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607977734; 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=3bFmX50G39j6aT5KRHw/D+sccv48EsviY9/iaa5IKyE=; b=Fc4E8bWhDaJCRhZzE++08SVB7VOF3m265SfHWlM9kwfF7X3RYdDjRYkZaKN9/y9ORsg0EaCSeY0FqPWHYz9ODEQvVFJOcoV4KnksExKcYWUsX/pp9WGZETMw5HRoIO1Bnpdn0RytVGgTbvOEOCrD8cQzfpebcZy9fcYUTd9IZ3U= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1607977734495178.13251598466172; Mon, 14 Dec 2020 12:28:54 -0800 (PST) Received: from localhost ([::1]:56956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koqU6-0003el-Vc for importer@patchew.org; Mon, 14 Dec 2020 11:14:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEi-00082x-1D; Mon, 14 Dec 2020 10:58:08 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:50349) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEW-0001Rn-V4; Mon, 14 Dec 2020 10:58:07 -0500 Received: from localhost.localdomain ([82.252.135.218]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M593i-1knkIu0Pm0-001Cx9; Mon, 14 Dec 2020 16:57:52 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 19/19] configure / meson: Move check for linux/btrfs.h to meson.build Date: Mon, 14 Dec 2020 16:57:33 +0100 Message-Id: <20201214155733.207430-20-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201214155733.207430-1-laurent@vivier.eu> References: <20201214155733.207430-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:iEQmCI2+fISc9GXEd0HEBd89pHFZqS7MeKajSfTqu9fnjfJpm8k oaE1SaXUSrFNLa8RHOPGEchUEPATFtCU0ioytqo8dFtIvMjmK+eYN1sEt5i6vkuaXPb4Syl JuSAsaNfihrbqohGdsY7U2J6Gp63AN5YJzj33URHurfp9j6YoyAGiNFaOjMOAFgOFXWaqv/ Z8pjy6qXr3qLos219z3Og== X-UI-Out-Filterresults: notjunk:1;V03:K0:JpqlyPvt3z0=:azeyHQ+Lk5DqgyKh8UOlja IV0jOepBjj5efbMm3TxlP2G5hqr1hHdLhfnOviqLjxZnT/fJ6hmCvMXg3XaeHZn0iCG711HYq oVvFUVqJS8ftgDYH3Y3CQIx4RbvBLpiO55cmRxWtreIkrMcPYDFnL2PRFFnWgSbirpE0JvNcO c38FEUMQWyJAkWuRoieZh2Dx58oezb84IdUsqs2yyS/pF2GXlz1SzCz0uuMCdHZ6Aj1B6tvL3 74IcO/8lqPj9KfGfCbE9jyPfyTZqd6E4rM3ZEO2BxmWhlAkJkYvcy71pQo2LzLo9zY5wF1W8G 0MgUxlnrwviJ9Y6Lgzr7W/8A7+VgUz5T50Z0c38F2FhUegyn2jT6IotEfNlRReSiAimGz0eRV 0KmchArxSABbqCT5cHg/JY9fl1f2FOv6iA3LCwSDrY4+uci4yrsEDV1kta+7ECz8UzvfL9Bad hwm9ULpbwg== 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=212.227.17.24; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de 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, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no 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: Thomas Huth , qemu-trivial@nongnu.org, Michael Tokarev , Richard Henderson , Laurent Vivier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth This check can be done in a much shorter way in meson.build. And while we're at it, rename the #define to HAVE_BTRFS_H to match the other HAVE_someheader_H symbols that we already have. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20201118171052.308191-7-thuth@redhat.com> Signed-off-by: Laurent Vivier --- configure | 9 --------- linux-user/syscall.c | 2 +- linux-user/syscall_defs.h | 2 +- meson.build | 1 + 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/configure b/configure index 6c13964b247a..cb21108d34c3 100755 --- a/configure +++ b/configure @@ -4402,12 +4402,6 @@ if compile_prog "" "" ; then syncfs=3Dyes fi =20 -# check for btrfs filesystem support (kernel must be 3.9+) -btrfs=3Dno -if check_include linux/btrfs.h ; then - btrfs=3Dyes -fi - # Search for bswap_32 function byteswap_h=3Dno cat > $TMPC << EOF @@ -6106,9 +6100,6 @@ fi if test "$syncfs" =3D "yes" ; then echo "CONFIG_SYNCFS=3Dy" >> $config_host_mak fi -if test "$btrfs" =3D "yes" ; then - echo "CONFIG_BTRFS=3Dy" >> $config_host_mak -fi if test "$inotify" =3D "yes" ; then echo "CONFIG_INOTIFY=3Dy" >> $config_host_mak fi diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 063130be048c..7bf99beb1814 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -112,7 +112,7 @@ #include #include #include -#ifdef CONFIG_BTRFS +#ifdef HAVE_BTRFS_H #include #endif #ifdef HAVE_DRM_H diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index cabbfb762dd9..b934d0b60676 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -1006,7 +1006,7 @@ struct target_rtc_pll_info { #define TARGET_FS_IOC32_SETVERSION TARGET_IOW('v', 2, int) =20 /* btrfs ioctls */ -#ifdef CONFIG_BTRFS +#ifdef HAVE_BTRFS_H #define TARGET_BTRFS_IOC_SNAP_CREATE TARGET_IOWU(BTRFS_IOCTL_MA= GIC, 1) #define TARGET_BTRFS_IOC_SCAN_DEV TARGET_IOWU(BTRFS_IOCTL_MA= GIC, 4) #define TARGET_BTRFS_IOC_FORGET_DEV TARGET_IOWU(BTRFS_IOCTL_MA= GIC, 5) diff --git a/meson.build b/meson.build index 04cdea75dd50..fba6413056a3 100644 --- a/meson.build +++ b/meson.build @@ -836,6 +836,7 @@ config_host_data.set('QEMU_VERSION_MAJOR', meson.projec= t_version().split('.')[0] config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('= .')[1]) config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('= .')[2]) =20 +config_host_data.set('HAVE_BTRFS_H', cc.has_header('linux/btrfs.h')) config_host_data.set('HAVE_DRM_H', cc.has_header('libdrm/drm.h')) config_host_data.set('HAVE_PTY_H', cc.has_header('pty.h')) config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h')) --=20 2.29.2