diff mbox

[15/36] monitor: register gen:false commands manually

Message ID 1443189844-20341-16-git-send-email-marcandre.lureau@redhat.com
State New
Headers show

Commit Message

Marc-André Lureau Sept. 25, 2015, 2:03 p.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Since some commands are using 'gen': false, they are not registered
automatically by the generator. Register manually instead.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 monitor.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Eric Blake Sept. 25, 2015, 3:56 p.m. UTC | #1
On 09/25/2015 08:03 AM, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Since some commands are using 'gen': false, they are not registered
> automatically by the generator. Register manually instead.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  monitor.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/monitor.c b/monitor.c
> index 410c3a5..a979924 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -945,6 +945,16 @@ static void qmp_query_qmp_schema(QDict *qdict, QObject **ret_data,
>      *ret_data = qobject_from_json(qmp_schema_json);
>  }
>  
> +static void qmp_init_marshal(void)
> +{
> +    qmp_register_command("query-qmp-schema", qmp_query_qmp_schema,
> +                         QCO_NO_OPTIONS);
> +    qmp_register_command("device_add", qmp_device_add,
> +                         QCO_NO_OPTIONS);
> +}

device_add wasn't even mentioned in a *.json file before your series.

/me goes and looks

Oh, you sneakily added it in "qapi: move examples to json schema".
Please separate that into its own patch, as it is more than just moving
examples.
diff mbox

Patch

diff --git a/monitor.c b/monitor.c
index 410c3a5..a979924 100644
--- a/monitor.c
+++ b/monitor.c
@@ -945,6 +945,16 @@  static void qmp_query_qmp_schema(QDict *qdict, QObject **ret_data,
     *ret_data = qobject_from_json(qmp_schema_json);
 }
 
+static void qmp_init_marshal(void)
+{
+    qmp_register_command("query-qmp-schema", qmp_query_qmp_schema,
+                         QCO_NO_OPTIONS);
+    qmp_register_command("device_add", qmp_device_add,
+                         QCO_NO_OPTIONS);
+}
+
+qapi_init(qmp_init_marshal);
+
 /* set the current CPU defined by the user */
 int monitor_set_cpu(int cpu_index)
 {