From 341f4a437a2861684b528a9127807f487caceada Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 19 Feb 2018 14:22:10 -0500 Subject: [PATCH] qapi: Use 'struct' instead of 'type' in schema Referring to "type" as both a meta-type (built-in, enum, union, alternate, or struct) and a specific type (the name that the schema uses for declaring structs) is confusing. Do the bulk of the conversion to "struct" in qapi schema, with a fairly mechanical: for f in `find -name '*.json'; do sed -i "s/'type'/'struct'/"; done followed by manually filtering out the places where we have a 'type' embedded in 'data'. Then tweak a couple of tests whose output changes slightly due to longer lines. I also verified that the generated files for QMP and QGA (such as qmp-commands.h) are the same before and after, as assurance that I didn't leave in any accidental member name changes. Backports commit 895a2a80e0e054f0d5d3715aa93d10d15e49f9f7 from qemu --- qemu/qapi-schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/qapi-schema.json b/qemu/qapi-schema.json index 37e53150..bf4a3c34 100644 --- a/qemu/qapi-schema.json +++ b/qemu/qapi-schema.json @@ -31,7 +31,7 @@ # # Since: 1.5 ## -{ 'type': 'X86CPUFeatureWordInfo', +{ 'struct': 'X86CPUFeatureWordInfo', 'data': { 'cpuid-input-eax': 'int', '*cpuid-input-ecx': 'int', 'cpuid-register': 'X86CPURegister32',