diff options
author | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2012-05-30 08:57:49 +0100 |
---|---|---|
committer | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2012-05-30 08:57:49 +0100 |
commit | 03fc6103c678b319ab0bf0c3771310a061371615 (patch) | |
tree | 0a76cab7b0da75d39bb9887338108c9c66be37d0 /tools/libxl/libxl_json.c | |
parent | 8e3d1ae55930dd8d718fe610d26ed7c784d34584 (diff) | |
download | xen-03fc6103c678b319ab0bf0c3771310a061371615.tar.gz xen-03fc6103c678b319ab0bf0c3771310a061371615.tar.bz2 xen-03fc6103c678b319ab0bf0c3771310a061371615.zip |
arm: compile libxl
libxl_cpuid_destroy has been renamed to libxl_cpuid_dispose; also cpuid
functions are only available on x86, so move them to libxl_cpuid.c.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxl/libxl_json.c')
-rw-r--r-- | tools/libxl/libxl_json.c | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/tools/libxl/libxl_json.c b/tools/libxl/libxl_json.c index f91ecae4ed..cd2719ab1e 100644 --- a/tools/libxl/libxl_json.c +++ b/tools/libxl/libxl_json.c @@ -146,66 +146,6 @@ out: return s; } -yajl_gen_status libxl_cpuid_policy_list_gen_json(yajl_gen hand, - libxl_cpuid_policy_list *pcpuid) -{ - libxl_cpuid_policy_list cpuid = *pcpuid; - yajl_gen_status s; - const char *input_names[2] = { "leaf", "subleaf" }; - const char *policy_names[4] = { "eax", "ebx", "ecx", "edx" }; - int i, j; - - /* - * Aiming for: - * [ - * { 'leaf': 'val-eax', - * 'subleaf': 'val-ecx', - * 'eax': 'filter', - * 'ebx': 'filter', - * 'ecx': 'filter', - * 'edx': 'filter' }, - * { 'leaf': 'val-eax', ..., 'eax': 'filter', ... }, - * ... etc ... - * ] - */ - - s = yajl_gen_array_open(hand); - if (s != yajl_gen_status_ok) goto out; - - if (cpuid == NULL) goto empty; - - for (i = 0; cpuid[i].input[0] != XEN_CPUID_INPUT_UNUSED; i++) { - s = yajl_gen_map_open(hand); - if (s != yajl_gen_status_ok) goto out; - - for (j = 0; j < 2; j++) { - if (cpuid[i].input[j] != XEN_CPUID_INPUT_UNUSED) { - s = libxl__yajl_gen_asciiz(hand, input_names[j]); - if (s != yajl_gen_status_ok) goto out; - s = yajl_gen_integer(hand, cpuid[i].input[j]); - if (s != yajl_gen_status_ok) goto out; - } - } - - for (j = 0; j < 4; j++) { - if (cpuid[i].policy[j] != NULL) { - s = libxl__yajl_gen_asciiz(hand, policy_names[j]); - if (s != yajl_gen_status_ok) goto out; - s = yajl_gen_string(hand, - (const unsigned char *)cpuid[i].policy[j], 32); - if (s != yajl_gen_status_ok) goto out; - } - } - s = yajl_gen_map_close(hand); - if (s != yajl_gen_status_ok) goto out; - } - -empty: - s = yajl_gen_array_close(hand); -out: - return s; -} - yajl_gen_status libxl_string_list_gen_json(yajl_gen hand, libxl_string_list *pl) { libxl_string_list l = *pl; |