
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@redhat.com> --- 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