Re: [PATCH v5 04/36] qemu_process: Refer to proc not cmd in process code

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

 



On Sun, Dec 02, 2018 at 23:09:58 -0600, Chris Venteicher wrote:
> s/cmd/proc/ in process code imported from qemu_capabilities.
> 
> No functionality is changed.  Just variable renaming.
> 
> Process code imported from qemu_capabilities was oriented around
> starting a process to issue a single QMP command.
> 
> Future usecases (ex. baseline, compare) expect to use a single process
> to issue multiple different QMP commands.
> 
> This patch changes the variable naming from cmd to proc to put focus
> on the process being maintained to issue commands.
> 
> Signed-off-by: Chris Venteicher <cventeic@xxxxxxxxxx>
> ---
>  src/qemu/qemu_capabilities.c |  18 ++---
>  src/qemu/qemu_process.c      | 138 +++++++++++++++++------------------
>  src/qemu/qemu_process.h      |   4 +-
>  3 files changed, 80 insertions(+), 80 deletions(-)
...
> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> index 46aed4fc9c..5f4853e0c4 100644
> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c
...
> @@ -8201,55 +8201,55 @@ qemuProcessQmpRun(qemuProcessQmpPtr cmd,
...
>      if (!(xmlopt = virDomainXMLOptionNew(NULL, NULL, NULL, NULL, NULL)) ||
> -        !(cmd->vm = virDomainObjNew(xmlopt)))
> +        !(proc->vm = virDomainObjNew(xmlopt)))
>          goto cleanup;
>  
> -    cmd->vm->pid = cmd->pid;
> +    proc->vm->pid = proc->pid;
>  
> -    if (!(cmd->mon = qemuMonitorOpen(cmd->vm, &cmd->config, true, true,
> +    if (!(proc->mon = qemuMonitorOpen(proc->vm, &proc->config, true, true,
>                                       0, &callbacks, NULL)))

You forgot to update the indentation of the line above.

>          goto ignore;
>  
> -    virObjectLock(cmd->mon);
> +    virObjectLock(proc->mon);
>  
>      ret = 0;
>  
>   cleanup:
> -    if (!cmd->mon)
> -        qemuProcessQmpAbort(cmd);
> +    if (!proc->mon)
> +        qemuProcessQmpAbort(proc);
>      virObjectUnref(xmlopt);
>  
>      return ret;
...

After fixing that and doing s/Qmp/QMP/g

Reviewed-by: Jiri Denemark <jdenemar@xxxxxxxxxx>

--
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