Re: [PATCH v5 17/36] qemu_process: Cleanup qemuProcessQmpStop function

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

 



On Sun, Dec 02, 2018 at 23:10:11 -0600, Chris Venteicher wrote:
> qemuProcessQmpStop is one of the 4 public functions used to create and
> manage a Qemu process for QMP command exchanges.
> 
> Add comment header and debug message.
> 
> Other minor code formatting cleanup.

This formatting "cleanup" is actually wrong.

> No change in functionality is intended.

And this statement can be dropped from the commit message too.

> 
> Signed-off-by: Chris Venteicher <cventeic@xxxxxxxxxx>
> ---
>  src/qemu/qemu_process.c | 16 +++++++++++++---
>  1 file changed, 13 insertions(+), 3 deletions(-)
> 
> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> index faf86dac5d..e9b50745d3 100644
> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c
> @@ -8390,10 +8390,20 @@ qemuProcessQmpStart(qemuProcessQmpPtr proc)
>      goto cleanup;
>  }
>  
> -
> -void
> -qemuProcessQmpStop(qemuProcessQmpPtr proc)
> +/**
> + * qemuProcessStop:
> + * @proc: Stores Process and Connection State
> + *
> + * Stop Monitor Connection and QEMU Process
> + */

OK, But I Don't Understand Why All Words Need To Be Capitalized :-)

> +void qemuProcessQmpStop(qemuProcessQmpPtr proc)

This is against our coding style.

>  {
> +    if (!proc)
> +        return;

This change belongs to "qemu_capabilities: Stop QEMU process before
freeing".

> +
> +    VIR_DEBUG("Shutting down proc=%p emulator=%s mon=%p pid=%lld",
> +              proc, proc->binary, proc->mon, (long long)proc->pid);
> +
>      if (proc->mon) {
>          virObjectUnlock(proc->mon);
>          qemuMonitorClose(proc->mon);

Jirka

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux