Am 19.10.2015 um 17:53 hat Max Reitz geschrieben:
> Expose the new read-only-mode option of 'blockdev-change-medium' for the
> 'change' HMP command.
> 
> Signed-off-by: Max Reitz <mre...@redhat.com>
> Reviewed-by: Eric Blake <ebl...@redhat.com>

> @@ -1336,9 +1337,16 @@ void hmp_change(Monitor *mon, const QDict *qdict)
>      const char *device = qdict_get_str(qdict, "device");
>      const char *target = qdict_get_str(qdict, "target");
>      const char *arg = qdict_get_try_str(qdict, "arg");
> +    const char *read_only = qdict_get_try_str(qdict, "read-only-mode");
> +    BlockdevChangeReadOnlyMode read_only_mode = 0;
>      Error *err = NULL;
>  
>      if (strcmp(device, "vnc") == 0) {
> +        if (read_only) {
> +            monitor_printf(mon,
> +                           "Parameter 'read-only-mode' is invalid for VNC");

Missing \n.

> +            return;
> +        }
>          if (strcmp(target, "passwd") == 0 ||
>              strcmp(target, "password") == 0) {
>              if (!arg) {

With that fixed:
Reviewed-by: Kevin Wolf <kw...@redhat.com>

Reply via email to