[libvirt] [PATCH 9/9] Use virFileFindResource to locate CPU map XML
Eric Blake
eblake at redhat.com
Thu Apr 24 22:18:02 UTC 2014
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 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140424/2eaa8cbc/attachment-0001.sig>
More information about the libvir-list
mailing list