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

Re: [libvirt] [PATCH v2.1 04/11] qemu: Introduce nbd-server-add command



On Fri, Jan 11, 2013 at 17:52:16 +0100, Michal Privoznik wrote:
> This will be used with new migration scheme.
> This patch creates basically just monitor stub
> functions. Wiring them into something useful
> is done in later patches.
> ---
>  src/qemu/qemu_monitor.c      | 22 ++++++++++++++++++++++
>  src/qemu/qemu_monitor.h      |  3 +++
>  src/qemu/qemu_monitor_json.c | 25 +++++++++++++++++++++++++
>  src/qemu/qemu_monitor_json.h |  3 +++
>  4 files changed, 53 insertions(+)
> 
> diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
> index c38e3f9..1bc6434 100644
> --- a/src/qemu/qemu_monitor.c
> +++ b/src/qemu/qemu_monitor.c
> @@ -3352,3 +3352,25 @@ int qemuMonitorNBDServerStart(qemuMonitorPtr mon,
>  
>      return qemuMonitorJSONNBDServerStart(mon, host, port);
>  }
> +
> +int qemuMonitorNBDServerAdd(qemuMonitorPtr mon,
> +                            const char *deviceID,
> +                            bool writable)
> +{
> +    VIR_DEBUG("mon=%p deviceID=%s",
> +              mon, deviceID);
> +
> +    if (!mon) {
> +        virReportError(VIR_ERR_INVALID_ARG, "%s",
> +                       _("monitor must not be NULL"));
> +        return -1;
> +    }
> +
> +    if (!mon->json) {
> +        virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",

VIR_ERR_OPERATION_UNSUPPORTED again

> +                       _("JSON monitor is required"));
> +        return -1;
> +    }
> +
> +    return qemuMonitorJSONNBDServerAdd(mon, deviceID, writable);
> +}
...

ACK with the error code fixed.

Jirka


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