mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
libxl: slightly correct JSON generation of CPU policy
The "cpuid_empty" label is also (in principle; maybe only for rubbish
input) reachable in the "cpuid_only" case. Hence the label needs to live
ahead of the check of the variable.
Fixes: 5b80cecb74 ("libxl: introduce MSR data in libxl_cpuid_policy")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
This commit is contained in:
1 parent
d0eabe3eaf
commit
ebce4e3a14
1 file changed
+2
-1
@@ -710,10 +710,11 @@ parse_cpuid:
|
||||
libxl__strdup(NOGC, libxl__json_object_get_string(r));
|
||||
}
|
||||
}
|
||||
|
||||
cpuid_empty:
|
||||
if (cpuid_only)
|
||||
return 0;
|
||||
|
||||
cpuid_empty:
|
||||
co = libxl__json_map_get("msr", o, JSON_ARRAY);
|
||||
if (!libxl__json_object_is_array(co))
|
||||
return ERROR_FAIL;
|
||||
|
||||