From nobody Wed May 15 07:23:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523604861920625.7713645439916; Fri, 13 Apr 2018 00:34:21 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3C6468553D; Fri, 13 Apr 2018 07:34:20 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 167138A9DE; Fri, 13 Apr 2018 07:34:20 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D2E2E4CA9C; Fri, 13 Apr 2018 07:34:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3D7YJJD009384 for ; Fri, 13 Apr 2018 03:34:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id 75979226F1; Fri, 13 Apr 2018 07:34:19 +0000 (UTC) Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6FD62608F0 for ; Fri, 13 Apr 2018 07:34:12 +0000 (UTC) Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 94641C049D4F for ; Fri, 13 Apr 2018 07:34:11 +0000 (UTC) Received: by mail-wr0-f193.google.com with SMTP id o3so7340352wri.2 for ; Fri, 13 Apr 2018 00:34:11 -0700 (PDT) Received: from rst.wireless.abdn.ac.uk (oa-edu-152-42.wireless.abdn.ac.uk. [137.50.152.42]) by smtp.gmail.com with ESMTPSA id a24sm7415811wra.4.2018.04.13.00.34.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Apr 2018 00:34:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=uVaL6B4g78qZWOXzpqnhKw+Ndf4lpDy9J3QTxHuezYU=; b=PgiWgbRD8ADf8cWzVf3MQZgkB/HpnUaDDHe6znKXVe14lmiWUDQnpwZnsKraze3tj6 dD8fzG/iefVL7Ih6qVrkj+nUpwVw6NwnmPjySfYKVZUyDDwKV3fnh/L9SN2Dxk6cSfCA P5EfzakwWAyKWQt7jO0/rkyMKqxzE5nsRt2rHNH42uF8vYHyfZ9OLcI4/iuqn6iQLYb4 FwdXZy7hMaM2cRkp7LmsbwTSnib6EW6WNgtojkPEfssCIAiYGdgHLKFVZVu3KMAAFmzF pNcIAfLcFhy0nmhIpeJ3OuCZTWMN+Z7GHoroQ5W3Mfzi8D7iS/AbAXvRRu4HJ1zAIF88 vCDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=uVaL6B4g78qZWOXzpqnhKw+Ndf4lpDy9J3QTxHuezYU=; b=MPQeSMWxwkY+Mp3hac/cemLNt7yAHxz56urDQpvIKSn6cDpsgB0NMrxv0+L2deAhBx /Bepp7z0YTEnI7/JqeDk+Gy9p6pVftduwgW7Bm3nX9iBhC/7IPYXK1OVzoflHeV8ndTR jSVruee8gcJ9R3Y/bxlgZs5R1sGXqnJ8X9/MeeppfO9Mzz1MCkXbhbfZF/qhrPZTnnsC DjPcMgOJOh2unCXnCrA1Dr0WlmowsJolRX1P8L5IzTPdTI7QZjLz75mSKr65k9L14y1w ohwRYvLOjJ24YrAhyC/Lft4Sf7eBCTRe+nVG1g++16EnQjO/7PLhcIiEIwNTJmH6CWxi j63A== X-Gm-Message-State: ALQs6tD5llKcE3msaxxC6ozqtv7nXFElnbOA5V/73a7f7xcJvYL8fLJ4 Md70O2TL2392xQpL0Io5BdHIv2PE X-Google-Smtp-Source: AIpwx48rG6JG3ZiyvBkAZZSXrQxZ4SpYns1vXvjdklgaky69Uanz2mDJFn6B8kas4eIUnLwkS2IBOA== X-Received: by 10.223.128.236 with SMTP id 99mr2864074wrl.120.1523604849896; Fri, 13 Apr 2018 00:34:09 -0700 (PDT) From: Radostin Stoyanov To: libvir-list@redhat.com Date: Fri, 13 Apr 2018 08:34:05 +0100 Message-Id: <20180413073405.30984-1-rstoyanov1@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 13 Apr 2018 07:34:11 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 13 Apr 2018 07:34:11 +0000 (UTC) for IP:'209.85.128.193' DOMAIN:'mail-wr0-f193.google.com' HELO:'mail-wr0-f193.google.com' FROM:'rstoyanov1@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.139 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.128.193 mail-wr0-f193.google.com 209.85.128.193 mail-wr0-f193.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.31 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Radostin Stoyanov Subject: [libvirt] [PATCHv2] Remove redundant virFileIsExecutable check X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 13 Apr 2018 07:34:20 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Remove unnecessary virFileIsExecutable check after virFindFileInPath. Since commit 9ae992f, virFindFileInPath will reject non-executables. 9ae992f24353d6506f570fc9dd58355b165e4472 virFindFileInPath: only find executable non-directory Signed-off-by: Radostin Stoyanov --- src/bhyve/bhyve_capabilities.c | 4 ---- src/qemu/qemu_capabilities.c | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/bhyve/bhyve_capabilities.c b/src/bhyve/bhyve_capabilities.c index 381cc0de3..e13085b1d 100644 --- a/src/bhyve/bhyve_capabilities.c +++ b/src/bhyve/bhyve_capabilities.c @@ -179,8 +179,6 @@ virBhyveProbeGrubCaps(virBhyveGrubCapsFlags *caps) binary =3D virFindFileInPath("grub-bhyve"); if (binary =3D=3D NULL) goto out; - if (!virFileIsExecutable(binary)) - goto out; =20 cmd =3D virCommandNew(binary); virCommandAddArg(cmd, "--help"); @@ -315,8 +313,6 @@ virBhyveProbeCaps(unsigned int *caps) binary =3D virFindFileInPath("bhyve"); if (binary =3D=3D NULL) goto out; - if (!virFileIsExecutable(binary)) - goto out; =20 if ((ret =3D bhyveProbeCapsRTC_UTC(caps, binary))) goto out; diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 27180e850..13c6c85d8 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -653,7 +653,7 @@ virQEMUCapsFindBinary(const char *format, =20 ret =3D virFindFileInPath(binary); VIR_FREE(binary); - if (ret && virFileIsExecutable(ret)) + if (ret) goto out; =20 VIR_FREE(ret); --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list