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

Chris Lalancette clalance at redhat.com
Mon Feb 1 15:14:55 UTC 2010


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




More information about the libvir-list mailing list