Re: [PATCH 9/9] Use virFileFindResource to locate CPU map XML

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

 



On 04/24/2014 10:05 AM, Daniel P. Berrange wrote:
> Replace use of cpuMapOverride with virFileFindResource
> to locate CPU map from build dir.
> 
> Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> ---
>  daemon/libvirtd.c        | 19 -------------------
>  src/cpu/cpu_map.c        | 31 ++++++++++---------------------
>  src/cpu/cpu_map.h        |  3 ---
>  tests/cputest.c          | 14 --------------
>  tests/qemuxml2argvtest.c |  7 -------
>  tests/qemuxmlnstest.c    |  7 -------
>  6 files changed, 10 insertions(+), 71 deletions(-)

I still wonder if we should try to get rid of the automake magic that
symlinks the git copy of the file into builddir on a VPATH build, by
having virFileFindResource learn how to look in two separate locations
for VPATH builds.  But it's not a show-stopper, and could certainly be a
separate patch.

> -    if (strstr(argv[0], "lt-libvirtd") ||
> -        strstr(argv[0], "/daemon/.libs/libvirtd")) {
> -        char *tmp = strrchr(argv[0], '/');
> -        char *cpumap;
> -        if (!tmp) {
> -            fprintf(stderr, _("%s: cannot identify driver directory\n"), argv[0]);
> -            exit(EXIT_FAILURE);
> -        }
> -        *tmp = '\0';

Yay - it also gets rid of munging argv[0] in place.

ACK to this if you remove the reference to cpuMapOverride from
libvirt_private.syms.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]