Re: [libvirt] [PATCH] Look in /usr/libexec for the qemu-kvm binary.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/01/2010 10:12 AM, Daniel Veillard wrote:
>> diff --git a/src/util/util.c b/src/util/util.c
>> index 0ce5026..394ef35 100644
>> --- a/src/util/util.c
>> +++ b/src/util/util.c
>> @@ -1114,6 +1114,19 @@ char *virFindFileInPath(const char *file)
>>      char *pathseg;
>>      char fullpath[PATH_MAX];
>>  
>> +    if (file == NULL)
>> +        return NULL;
>> +
>> +    /* if we are passed an absolute path (starting with /), return a
>> +     * copy of that path
>> +     */
>> +    if (file[0] == '/') {
>> +        if (virFileExists(file))
>> +            return strdup(file);
>> +        else
>> +            return NULL;
>> +    }
>> +
>>      /* copy PATH env so we can tweak it */
>>      if (virStrcpyStatic(pathenv, getenv("PATH")) == NULL)
>>          return NULL;
> 
>   ACK, makes sense !

Thanks, pushed.

-- 
Chris Lalancette

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]