提交 327ae930 编写于 作者: R Radostin Stoyanov 提交者: Michal Privoznik

Remove redundant virFileIsExecutable check

Remove unnecessary virFileIsExecutable check after virFindFileInPath.
Since the commit 9ae992f2 virFindFileInPath will reject non-executables.
Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 65a372d6
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册