qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 5/9] fbdev: add monitor command to enable/dis


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v2 5/9] fbdev: add monitor command to enable/disable
Date: Thu, 13 Sep 2012 18:16:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Gerd Hoffmann <address@hidden> writes:

> This patch adds a fbdev monitor command to enable/disable
> the fbdev display at runtime to both qmp and hmp.
>
> qmp: fbdev enable=on|off
> hmp: fbdev on|off
>
> Signed-off-by: Gerd Hoffmann <address@hidden>
> ---
>  hmp-commands.hx  |   15 +++++++++++++++
>  hmp.c            |    9 +++++++++
>  hmp.h            |    1 +
>  qapi-schema.json |   14 ++++++++++++++
>  qmp-commands.hx  |    6 ++++++
>  qmp.c            |   17 +++++++++++++++++
>  6 files changed, 62 insertions(+), 0 deletions(-)
>
> diff --git a/hmp-commands.hx b/hmp-commands.hx
> index ed67e99..366a92b 100644
> --- a/hmp-commands.hx
> +++ b/hmp-commands.hx
> @@ -1377,6 +1377,21 @@ passed since 1970, i.e. unix epoch.
>  ETEXI
>  
>      {
> +        .name       = "fbdev",
> +        .args_type  = "enable:b",
> +        .params     = "on|off",
> +        .help       = "enable/disable fbdev",
> +        .mhandler.cmd = hmp_fbdev,
> +    },
> +
> +STEXI
> address@hidden fbdev on | off
> address@hidden fbdev
> +
> +enable/disable fbdev
> +ETEXI
> +
> +    {
>          .name       = "info",
>          .args_type  = "item:s?",
>          .params     = "[subcommand]",
> diff --git a/hmp.c b/hmp.c
> index ba6fbd3..a7feec5 100644
> --- a/hmp.c
> +++ b/hmp.c
> @@ -1168,3 +1168,12 @@ void hmp_screen_dump(Monitor *mon, const QDict *qdict)
>      qmp_screendump(filename, &err);
>      hmp_handle_error(mon, &err);
>  }
> +
> +void hmp_fbdev(Monitor *mon, const QDict *qdict)
> +{
> +    int enable = qdict_get_bool(qdict, "enable");
> +    Error *errp = NULL;
> +
> +    qmp_fbdev(enable, &errp);
> +    hmp_handle_error(mon, &errp);
> +}
> diff --git a/hmp.h b/hmp.h
> index 48b9c59..9c3d315 100644
> --- a/hmp.h
> +++ b/hmp.h
> @@ -73,5 +73,6 @@ void hmp_getfd(Monitor *mon, const QDict *qdict);
>  void hmp_closefd(Monitor *mon, const QDict *qdict);
>  void hmp_send_key(Monitor *mon, const QDict *qdict);
>  void hmp_screen_dump(Monitor *mon, const QDict *qdict);
> +void hmp_fbdev(Monitor *mon, const QDict *qdict);
>  
>  #endif
> diff --git a/qapi-schema.json b/qapi-schema.json
> index a9f465a..ea8c3c5 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -2555,3 +2555,17 @@
>  # Since: 0.14.0
>  ##
>  { 'command': 'screendump', 'data': {'filename': 'str'} }
> +
> +# @fbdev:
> +#
> +# Enable/disable fbdev.
> +#

You fixed the doc pasto in "Returns:" below (thanks), but missed this
one:

> +# @enable: true to set the link status to be up

Guess I should've marked it more clearly in my review.

> +#
> +# Returns: Nothing on success
> +#          GenericError on failure.
> +#
> +# Since: 1.3
> +#
> +##
> +{ 'command': 'fbdev', 'data': {'enable': 'bool'} }
[...]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]