From nobody Sat Apr 27 13:25:22 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 14909329896701011.5809666162282; Thu, 30 Mar 2017 21:03:09 -0700 (PDT) Received: from localhost ([::1]:38760 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctnmF-0007DV-Ez for importer@patchew.org; Fri, 31 Mar 2017 00:03:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctnl4-0006YQ-Pk for qemu-devel@nongnu.org; Fri, 31 Mar 2017 00:01:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ctnl1-00084J-Nc for qemu-devel@nongnu.org; Fri, 31 Mar 2017 00:01:54 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:53101) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ctnl1-000833-F0 for qemu-devel@nongnu.org; Fri, 31 Mar 2017 00:01:51 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v2V403BO116194 for ; Fri, 31 Mar 2017 00:01:49 -0400 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0a-001b2d01.pphosted.com with ESMTP id 29h2j2j8cd-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 31 Mar 2017 00:01:49 -0400 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 31 Mar 2017 00:01:48 -0400 Received: from b01cxnp22035.gho.pok.ibm.com (9.57.198.25) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 31 Mar 2017 00:01:46 -0400 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v2V40Wpg60752036; Fri, 31 Mar 2017 04:01:45 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DA4B912403D; Fri, 31 Mar 2017 00:01:40 -0400 (EDT) Received: from localhost (unknown [9.53.92.194]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP id C53F8124044; Fri, 31 Mar 2017 00:01:40 -0400 (EDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Thu, 30 Mar 2017 23:01:08 -0500 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490932869-31217-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1490932869-31217-1-git-send-email-mdroth@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17033104-0040-0000-0000-000002FFD2AF X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006875; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000206; SDB=6.00841023; UDB=6.00414048; IPR=6.00619088; BA=6.00005248; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00014869; XFM=3.00000013; UTC=2017-03-31 04:01:47 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17033104-0041-0000-0000-000006F3E1DB Message-Id: <1490932869-31217-2-git-send-email-mdroth@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-03-31_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=3 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703310034 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PULL for-2.9 1/2] qga: don't fail if mount doesn't have slave devices X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" In some cases the slave devices of a virtual block device are tracked by the parent in the corresponding sysfs node. For instance, if we have a loop-back mount of the form: /dev/loop3p1 on /home/mdroth/mnt type ext4 (rw,relatime,data=3Dordered) this will be reflected in sysfs as: /sys/devices/virtual/block/loop3/ ... /sys/devices/virtual/block/loop3/slaves /sys/devices/virtual/block/loop3/loop3p1 The current code however assumes the mounted virtual block device, loop3p1 in this case, contains the slaves directory, and reports an error otherwise. This breaks 'make check' in certain environments. Fix this by simply skipping attempts to generate disk topology information in these cases. Since this information is documented in QAPI as optionally-reported, this should be ok from an API perspective. In the future, this can possibly be improved upon by collecting topology information from the parent in these cases. Reported-by: Peter Maydell Cc: Peter Maydell Signed-off-by: Michael Roth Tested-by: Peter Maydell --- qga/commands-posix.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 73d93eb..915df9e 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -999,7 +999,9 @@ static void build_guest_fsinfo_for_virtual_device(char = const *syspath, dirpath =3D g_strdup_printf("%s/slaves", syspath); dir =3D opendir(dirpath); if (!dir) { - error_setg_errno(errp, errno, "opendir(\"%s\")", dirpath); + if (errno !=3D ENOENT) { + error_setg_errno(errp, errno, "opendir(\"%s\")", dirpath); + } g_free(dirpath); return; } --=20 2.7.4 From nobody Sat Apr 27 13:25:22 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1490933058412470.8792703168667; Thu, 30 Mar 2017 21:04:18 -0700 (PDT) Received: from localhost ([::1]:38763 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctnnN-0007w1-4R for importer@patchew.org; Fri, 31 Mar 2017 00:04:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctnl4-0006YE-6D for qemu-devel@nongnu.org; Fri, 31 Mar 2017 00:01:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ctnl1-00083l-5X for qemu-devel@nongnu.org; Fri, 31 Mar 2017 00:01:54 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:40263 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ctnl1-000837-0M for qemu-devel@nongnu.org; Fri, 31 Mar 2017 00:01:51 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v2V4026n021319 for ; Fri, 31 Mar 2017 00:01:50 -0400 Received: from e38.co.us.ibm.com (e38.co.us.ibm.com [32.97.110.159]) by mx0b-001b2d01.pphosted.com with ESMTP id 29h4ekum8w-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 31 Mar 2017 00:01:49 -0400 Received: from localhost by e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 30 Mar 2017 22:01:48 -0600 Received: from b03cxnp08028.gho.boulder.ibm.com (9.17.130.20) by e38.co.us.ibm.com (192.168.1.138) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 30 Mar 2017 22:01:46 -0600 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v2V41RKt15335742; Thu, 30 Mar 2017 21:01:46 -0700 Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D8E59BE042; Thu, 30 Mar 2017 22:01:45 -0600 (MDT) Received: from localhost (unknown [9.53.92.194]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP id C0F07BE03A; Thu, 30 Mar 2017 22:01:45 -0600 (MDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Thu, 30 Mar 2017 23:01:09 -0500 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490932869-31217-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1490932869-31217-1-git-send-email-mdroth@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17033104-0028-0000-0000-000007520BE2 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006875; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000206; SDB=6.00841023; UDB=6.00414048; IPR=6.00619088; BA=6.00005248; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00014869; XFM=3.00000013; UTC=2017-03-31 04:01:48 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17033104-0029-0000-0000-000034B8B9D7 Message-Id: <1490932869-31217-3-git-send-email-mdroth@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-03-31_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703310034 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PULL for-2.9 2/2] qga: Make qemu-ga compile statically for Windows X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Sameeh Jubran Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Sameeh Jubran Attempting to compile qemu-ga statically as follows for Windows causes the following error: Compilation: ./configure --disable-docs --target-list=3Dx86_64-softmmu \ --cross-prefix=3Dx86_64-w64-mingw32- --static \ --enable-guest-agent-msi --with-vss-sdk=3D/path/to/VSSSDK72 make -j8 qemu-ga Error: path/to/qemu/stubs/error-printf.c:7: undefined reference to `__imp_g_te= st_config_vars' collect2: error: ld returned 1 exit status Makefile:444: recipe for target 'qemu-ga.exe' failed make: *** [qemu-ga.exe] Error 1 This is caused by a bug in the pkg-config file for glib as it doesn't define GLIB_STATIC_COMPILATION for pkg-config --static. Signed-off-by: Sameeh Jubran Reviewed-by: Stefan Hajnoczi Signed-off-by: Michael Roth --- configure | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configure b/configure index d1ce33b..07018e0 100755 --- a/configure +++ b/configure @@ -3066,6 +3066,13 @@ if test "$modules" =3D yes; then glib_modules=3D"$glib_modules gmodule-2.0" fi =20 +# This workaround is required due to a bug in pkg-config file for glib as = it +# doesn't define GLIB_STATIC_COMPILATION for pkg-config --static + +if test "$static" =3D yes -a "$mingw32" =3D yes; then + QEMU_CFLAGS=3D"-DGLIB_STATIC_COMPILATION $QEMU_CFLAGS" +fi + for i in $glib_modules; do if $pkg_config --atleast-version=3D$glib_req_ver $i; then glib_cflags=3D$($pkg_config --cflags $i) --=20 2.7.4