[libvirt] [PATCH 2/5] qemu_hotplug: Introduce and use qemuDomainDeleteDevice

Peter Krempa pkrempa at redhat.com
Tue Mar 12 15:43:36 UTC 2019


On Tue, Mar 12, 2019 at 16:13:17 +0100, Michal Privoznik wrote:
> The aim of this function will be to fix return value of
> qemuMonitorDelDevice() in one specific case. But that is yet to
> come. Right now this is nothing but a plain substitution.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  src/qemu/qemu_hotplug.c | 60 ++++++++++++++++++++++++++++-------------
>  1 file changed, 41 insertions(+), 19 deletions(-)
> 
> diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
> index f43f80668c..574477e916 100644
> --- a/src/qemu/qemu_hotplug.c
> +++ b/src/qemu/qemu_hotplug.c
> @@ -67,6 +67,28 @@ VIR_LOG_INIT("qemu.qemu_hotplug");
>  unsigned long long qemuDomainRemoveDeviceWaitTime = 1000ull * 5;
>  
>  
> +/**
> + * qemuDomainDeleteDevice:
> + * @mon: qemu monitor
> + * @alias: device to remove
> + *
> + * A simple wrapper around qemuMonitorDelDevice().

You don't change this once this becomes a more complex helper, so you
can perhaps leave it out.

> + * @mon must be locked upon entry.
> + *
> + * Returns: 0 on success,
> + *         -1 otherwise.
> + */
> +static inline int

Inline? Don't.

> +qemuDomainDeleteDevice(qemuMonitorPtr mon,
> +                       const char *alias)
> +{

ACK with above addressed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190312/dfa41291/attachment-0001.sig>


More information about the libvir-list mailing list