From nobody Fri Apr 19 10:13:50 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 1523599325861878.6624436409643; Thu, 12 Apr 2018 23:02:05 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 33A5487625; Fri, 13 Apr 2018 06:02:03 +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 A323212A65; Fri, 13 Apr 2018 06:02:00 +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 EBCD44CA9E; Fri, 13 Apr 2018 06:01:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3D61tWj021503 for ; Fri, 13 Apr 2018 02:01:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6795917BBC; Fri, 13 Apr 2018 06:01:55 +0000 (UTC) Received: from mx1.redhat.com (ext-mx16.extmail.prod.ext.phx2.redhat.com [10.5.110.45]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 61A5618A51 for ; Fri, 13 Apr 2018 06:01:52 +0000 (UTC) Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) (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 A84993136319 for ; Fri, 13 Apr 2018 06:01:51 +0000 (UTC) Received: by mail-wr0-f195.google.com with SMTP id l49so7129755wrl.4 for ; Thu, 12 Apr 2018 23:01:51 -0700 (PDT) Received: from rst.Home ([2a02:c7d:692a:c500:1ebc:73f3:5f60:b131]) by smtp.gmail.com with ESMTPSA id f54sm5209019wra.80.2018.04.12.23.01.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Apr 2018 23:01:49 -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=0PZbkTTjoKrChH30lE6s4Hgjeeu0nmbmjywfExRTSKs=; b=tLywglyHMIZxdlhLCP1XY/sUmFaMQGEBl2/3RwmT237AL8EeZAaE64AwvV/0W6m6IR 4yUYCmndhYwlJvgWoJXzAWKZQ0E9H+lVh6m1+egy5hYEiB5fAvzO4sSha4tBXMEkxXGU w2ZS2tmptAhw4CctJebja5GJapBhSMyFpKtD99c58+tlgWEfiJ5UpgHraIHpbDhVw5Er lz3/YIsO0h8QnT1NDXBbUmoIzjeCxjMTHyRkNxf6APuzNGoNnZYIHDbW42ItUroKMujZ mXkGfqFWlMfn6doN8zyKdmTfjTDMMKCWLve07DV/6TCa4d+KZpATrcUD7kit8eOMk8T8 5YLA== 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=0PZbkTTjoKrChH30lE6s4Hgjeeu0nmbmjywfExRTSKs=; b=XfDXqUddVH+P2BBhCzd2c51AFPnQGuGcSUrf3LWMek8zl7dWSu++LwG7xLFIAkQ/YT B3HILrBrbox7F26R8aMg6cbzm4VX42IS63Td6Ho5azbn10sClpp9E4/b1AS8smMcxg/q OOc9GfqRYpRbcMIzcfW7hXjL7jjj8WhszlXdYho6YdwSO7M7NrehZI3klO++g5PD0Lzb YFt8AWUGME6id8zw42yn5ER/m4hwuGOwPA7dx4wy64pVqe55FqN0yAXjjF9gzsOBDdVa ksYDlgROly22V1gqkEYSrdrEFRunaHINM9lf/uE9NenfObOd9YFNPGRVUUWzMYeOe9CF lSmQ== X-Gm-Message-State: ALQs6tDaXJx1TlvGAxVZbbWbNhte89BzlZySFk2LwxKLaaKOR3ok6slW 3Ogwc9C9rT9lzsXqHLKcEE6XObGh X-Google-Smtp-Source: AIpwx4+JodZGIhMEMIvMM+A/IbAxMjfxvhiclGxBceweaUysgG5O5ruXEU/768dVjeL0I2C74CjedA== X-Received: by 10.223.131.162 with SMTP id 31mr2134077wre.19.1523599309933; Thu, 12 Apr 2018 23:01:49 -0700 (PDT) From: Radostin Stoyanov To: libvir-list@redhat.com Date: Fri, 13 Apr 2018 07:01:45 +0100 Message-Id: <20180413060145.10659-1-rstoyanov1@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Fri, 13 Apr 2018 06:01:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Fri, 13 Apr 2018 06:01:51 +0000 (UTC) for IP:'209.85.128.195' DOMAIN:'mail-wr0-f195.google.com' HELO:'mail-wr0-f195.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.195 mail-wr0-f195.google.com 209.85.128.195 mail-wr0-f195.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.45 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: Radostin Stoyanov Subject: [libvirt] [PATCH] 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 13 Apr 2018 06:02:04 +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 the 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..5ebc72f6f 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 =3D=3D NULL) 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