Commit 385057cb authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2015-05-15' into staging



qapi: Fix qapi mangling of downstream names, and more

# gpg: Signature made Fri May 15 17:41:31 2015 BST using RSA key ID EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>"

* remotes/armbru/tags/pull-qapi-2015-05-15: (26 commits)
  qapi: Inline gen_command_decl_prologue(), gen_command_def_prologue()
  qapi: Drop pointless flush() before close()
  qapi: Factor open_output(), close_output() out of generators
  qapi: Turn generators' mandatory option -i into an argument
  qapi: Fix generators to report command line errors decently
  qapi: Factor parse_command_line() out of the generators
  qapi: qapi-commands.py option --type is unused, drop it
  qapi: qapi-event.py option -b does nothing, drop it
  tests: Add missing dependencies on $(qapi-py)
  qapi: Support downstream events and commands
  qapi: Support downstream alternates
  qapi: Support downstream flat unions
  qapi: Support downstream simple unions
  qapi: Support downstream structs
  qapi: Support downstream enums
  qapi: Make c_type() consistently convert qapi names
  qapi: Tidy c_type() logic
  qapi: Move camel_to_upper(), c_enum_const() to closely related code
  qapi: Use c_enum_const() in generate_alternate_qtypes()
  qapi: Simplify c_enum_const()
  ...

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 99e7627a 4180978c
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -243,17 +243,17 @@ qapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py
qga/qapi-generated/qga-qapi-types.c qga/qapi-generated/qga-qapi-types.h :\
$(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)
	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py \
		$(gen-out-type) -o qga/qapi-generated -p "qga-" -i $<, \
		$(gen-out-type) -o qga/qapi-generated -p "qga-" $<, \
		"  GEN   $@")
qga/qapi-generated/qga-qapi-visit.c qga/qapi-generated/qga-qapi-visit.h :\
$(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py)
	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py \
		$(gen-out-type) -o qga/qapi-generated -p "qga-" -i $<, \
		$(gen-out-type) -o qga/qapi-generated -p "qga-" $<, \
		"  GEN   $@")
qga/qapi-generated/qga-qmp-commands.h qga/qapi-generated/qga-qmp-marshal.c :\
$(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py)
	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py \
		$(gen-out-type) -o qga/qapi-generated -p "qga-" -i $<, \
		$(gen-out-type) -o qga/qapi-generated -p "qga-" $<, \
		"  GEN   $@")

qapi-modules = $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/qapi/common.json \
@@ -263,22 +263,22 @@ qapi-modules = $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/qapi/common.json \
qapi-types.c qapi-types.h :\
$(qapi-modules) $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)
	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py \
		$(gen-out-type) -o "." -b -i $<, \
		$(gen-out-type) -o "." -b $<, \
		"  GEN   $@")
qapi-visit.c qapi-visit.h :\
$(qapi-modules) $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py)
	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py \
		$(gen-out-type) -o "." -b -i $<, \
		$(gen-out-type) -o "." -b $<, \
		"  GEN   $@")
qapi-event.c qapi-event.h :\
$(qapi-modules) $(SRC_PATH)/scripts/qapi-event.py $(qapi-py)
	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-event.py \
		$(gen-out-type) -o "." -b -i $<, \
		$(gen-out-type) -o "." $<, \
		"  GEN   $@")
qmp-commands.h qmp-marshal.c :\
$(qapi-modules) $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py)
	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py \
		$(gen-out-type) -o "." -m -i $<, \
		$(gen-out-type) -o "." -m $<, \
		"  GEN   $@")

QGALIB_GEN=$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-visit.h qga-qmp-commands.h)
+1 −0
Original line number Diff line number Diff line
@@ -1435,6 +1435,7 @@ CpuInfoList *qmp_query_cpus(Error **errp)
        info->value->CPU = cpu->cpu_index;
        info->value->current = (cpu == first_cpu);
        info->value->halted = cpu->halted;
        info->value->qom_path = object_get_canonical_path(OBJECT(cpu));
        info->value->thread_id = cpu->thread_id;
#if defined(TARGET_I386)
        info->value->has_pc = true;
+5 −5
Original line number Diff line number Diff line
@@ -536,7 +536,7 @@ created code.
Example:

    $ python scripts/qapi-types.py --output-dir="qapi-generated" \
    --prefix="example-" --input-file=example-schema.json
    --prefix="example-" example-schema.json
    $ cat qapi-generated/example-qapi-types.c
[Uninteresting stuff omitted...]

@@ -623,7 +623,7 @@ $(prefix)qapi-visit.h: declarations for previously mentioned visitor
Example:

    $ python scripts/qapi-visit.py --output-dir="qapi-generated"
    --prefix="example-" --input-file=example-schema.json
    --prefix="example-" example-schema.json
    $ cat qapi-generated/example-qapi-visit.c
[Uninteresting stuff omitted...]

@@ -681,7 +681,7 @@ Example:
        error_propagate(errp, err);
    }
    $ python scripts/qapi-commands.py --output-dir="qapi-generated" \
    --prefix="example-" --input-file=example-schema.json
    --prefix="example-" example-schema.json
    $ cat qapi-generated/example-qapi-visit.h
[Uninteresting stuff omitted...]

@@ -715,7 +715,7 @@ $(prefix)qmp-commands.h: Function prototypes for the QMP commands
Example:

    $ python scripts/qapi-commands.py --output-dir="qapi-generated"
    --prefix="example-" --input-file=example-schema.json
    --prefix="example-" example-schema.json
    $ cat qapi-generated/example-qmp-marshal.c
[Uninteresting stuff omitted...]

@@ -806,7 +806,7 @@ $(prefix)qapi-event.c - Implementation of functions to send an event
Example:

    $ python scripts/qapi-event.py --output-dir="qapi-generated"
    --prefix="example-" --input-file=example-schema.json
    --prefix="example-" example-schema.json
    $ cat qapi-generated/example-qapi-event.c
[Uninteresting stuff omitted...]

+2 −2
Original line number Diff line number Diff line
@@ -232,7 +232,7 @@ Example:
{ "event": "GUEST_PANICKED",
     "data": { "action": "pause" } }

MEM_HOT_UNPLUG_ERROR
MEM_UNPLUG_ERROR
--------------------
Emitted when memory hot unplug error occurs.

@@ -243,7 +243,7 @@ Data:

Example:

{ "event": "MEM_HOT_UNPLUG_ERROR"
{ "event": "MEM_UNPLUG_ERROR"
  "data": { "device": "dimm1",
            "msg": "acpi: device unplug for unsupported device"
  },
+6 −2
Original line number Diff line number Diff line
@@ -679,6 +679,8 @@
# @halted: true if the virtual CPU is in the halt state.  Halt usually refers
#          to a processor specific low power mode.
#
# @qom_path: path to the CPU object in the QOM tree (since 2.4)
#
# @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
#                pointer.
#                If the target is Sparc, this is the PC component of the
@@ -699,8 +701,10 @@
#        data is sent to the client, the guest may no longer be halted.
##
{ 'struct': 'CpuInfo',
  'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
           '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
  'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
           'qom_path': 'str',
           '*pc': 'int', '*nip': 'int', '*npc': 'int', '*PC': 'int',
           'thread_id': 'int'} }

##
# @query-cpus:
Loading