mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
Remove redundant virFileIsExecutable check
Remove unnecessary virFileIsExecutable check after virFindFileInPath. Since the commit 9ae992f virFindFileInPath will reject non-executables. Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
65a372d6e0
commit
327ae930a4
@ -179,8 +179,6 @@ virBhyveProbeGrubCaps(virBhyveGrubCapsFlags *caps)
|
||||
binary = virFindFileInPath("grub-bhyve");
|
||||
if (binary == NULL)
|
||||
goto out;
|
||||
if (!virFileIsExecutable(binary))
|
||||
goto out;
|
||||
|
||||
cmd = virCommandNew(binary);
|
||||
virCommandAddArg(cmd, "--help");
|
||||
@ -315,8 +313,6 @@ virBhyveProbeCaps(unsigned int *caps)
|
||||
binary = virFindFileInPath("bhyve");
|
||||
if (binary == NULL)
|
||||
goto out;
|
||||
if (!virFileIsExecutable(binary))
|
||||
goto out;
|
||||
|
||||
if ((ret = bhyveProbeCapsRTC_UTC(caps, binary)))
|
||||
goto out;
|
||||
|
@ -649,16 +649,10 @@ virQEMUCapsFindBinary(const char *format,
|
||||
char *binary = NULL;
|
||||
|
||||
if (virAsprintf(&binary, format, archstr) < 0)
|
||||
goto out;
|
||||
return NULL;
|
||||
|
||||
ret = virFindFileInPath(binary);
|
||||
VIR_FREE(binary);
|
||||
if (ret && virFileIsExecutable(ret))
|
||||
goto out;
|
||||
|
||||
VIR_FREE(ret);
|
||||
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user