[libvirt] [PATCH v1 3/3] qemu_conf.c: introduce qemuAddRemoveSharedDeviceInternal

Michal Privoznik mprivozn at redhat.com
Mon Sep 9 12:55:04 UTC 2019


On 9/4/19 1:06 AM, Daniel Henrique Barboza wrote:
> After the previous commits, qemuAddSharedDevice() and
> qemuRemoveSharedDevice() are now the same code with a different
> flag to call the internal functions.
> 
> This patch aggregates the common code into a new function called
> qemuAddRemoveSharedDeviceInternal() to further reduce
> code repetition. Both qemuAddSharedDevice() and
> qemuRemoveSharedDevice() are kept since they are public
> functions used elsewhere.
> 
> No functional change was made.
> 
> Signed-off-by: Daniel Henrique Barboza <danielhb413 at gmail.com>
> ---
>   src/qemu/qemu_conf.c | 42 ++++++++++++++++++++++--------------------
>   1 file changed, 22 insertions(+), 20 deletions(-)
> 
> diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
> index 422f0d743d..6ce2d10ac7 100644
> --- a/src/qemu/qemu_conf.c
> +++ b/src/qemu/qemu_conf.c
> @@ -1793,6 +1793,26 @@ qemuAddRemoveSharedHostdevInternal(virQEMUDriverPtr driver,
>   
>   }
>   
> +static int
> +qemuAddRemoveSharedDeviceInternal(virQEMUDriverPtr driver,

Again, qemuSharedDeviceAddRemoveInternal()?

I've made all the changes and keep them locally. Just let me know how 
you feel about my suggestions so that I can ACK these and push them.

Michal




More information about the libvir-list mailing list