• E
    virFindFileInPath: only find executable non-directory · 9ae992f2
    Eric Blake 提交于
    Without this patch, at least tests/daemon-conf (which sticks
    $builddir/src in the PATH) tries to execute the directory
    $builddir/src/qemu rather than a real qemu binary.
    
    * src/util/util.h (virFileExists): Adjust prototype.
    (virFileIsExecutable): New prototype.
    * src/util/util.c (virFindFileInPath): Reject non-executables and
    directories.  Avoid huge stack allocation.
    (virFileExists): Use lighter-weight syscall.
    (virFileIsExecutable): New function.
    * src/libvirt_private.syms (util.h): Export new function.
    9ae992f2
libvirt_private.syms 19.2 KB