On 08/01/2018 01:02 PM, Daniel P. Berrangé wrote:
Allow for syntax
<include filename="fooo.xml"/>
to reference other files in the CPU database directory
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
libvirt.spec.in | 2 +-
mingw-libvirt.spec.in | 4 +--
src/Makefile.am | 2 +-
src/cpu/cpu_map.c | 84 +++++++++++++++++++++++++++++++++++++++++--
4 files changed, 86 insertions(+), 6 deletions(-)
I'll assume you got the spec/makefile magic correct as it's not in my
wheelhouse!
diff --git a/src/cpu/cpu_map.c b/src/cpu/cpu_map.c
index d263eb8cdd..9e090919ed 100644
--- a/src/cpu/cpu_map.c
+++ b/src/cpu/cpu_map.c
@@ -70,6 +70,83 @@ static int load(xmlXPathContextPtr ctxt,
return ret;
}
[...]
+
+
+static int loadIncludes(xmlXPathContextPtr ctxt,
+ cpuMapLoadCallback callback,
+ void *data)
static int
loadIncludes(...)
for consistency
+{
+ int ret = -1;
[...]
int cpuMapLoad(const char *arch,
cpuMapLoadCallback cb,
@@ -88,7 +165,7 @@ int cpuMapLoad(const char *arch,
PKGDATADIR)))
return -1;
- VIR_DEBUG("Loading CPU map from %s", mapfile);
+ VIR_DEBUG("Loading '%s' CPU map from %s", arch, mapfile);
Considering the subsequent NULL check:
s/arch/NULLSTR(arch)/
or move the VIR_DEBUG after the check (IDC).
I'm not even sure why @mapfile filling is above the argument validation
checks, but that's a different issue and since more changes are about to
come, it's not that important ;-)... As long there is either a NULLSTR
or moved message, that's fine.
Reviewed-by: John Ferlan <jferlan(a)redhat.com>
John
[...]