On 10/31/2013 05:29 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berra...@redhat.com>
> 
> Include reference of the VM object pointer and name in debug
> logs for QEMU start/stop functions. Also make sure we log the
> PID that we started, since it isn't available elsewhere in the
> logs.
> 
> Signed-off-by: Daniel P. Berrange <berra...@redhat.com>
> ---
>  src/qemu/qemu_process.c | 33 ++++++++++++---------------------
>  1 file changed, 12 insertions(+), 21 deletions(-)
> 
> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> index bdffdf8..dd7566b 100644
> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c
> @@ -3499,6 +3499,9 @@ int qemuProcessStart(virConnectPtr conn,
>      virQEMUDriverConfigPtr cfg;
>      virCapsPtr caps = NULL;
>  
> +    VIR_DEBUG("vm=%p name=%s id=%d pid=%d",
> +              vm, vm->def->name, vm->def->id, vm->pid);

Needs to be '"pid=%llu", (unsigned long long) vm->pid' no thanks to mingw64.

> +        VIR_DEBUG("QEMU vm=%p name=%s running with pid=%llu",
> +                  vm, vm->def->name, (unsigned long long)vm->pid);

This one is correct.

> @@ -4085,8 +4076,8 @@ qemuProcessKill(virDomainObjPtr vm, unsigned int flags)
>  {
>      int ret;
>  
> -    VIR_DEBUG("vm=%s pid=%d flags=%x",
> -              vm->def->name, vm->pid, flags);
> +    VIR_DEBUG("vm=%p name=%s pid=%d flags=%x",
> +              vm, vm->def->name, vm->pid, flags);

Another incorrect type.

>  
>      if (!(flags & VIR_QEMU_PROCESS_KILL_NOCHECK)) {
>          if (!virDomainObjIsActive(vm)) {
> @@ -4126,8 +4117,8 @@ void qemuProcessStop(virQEMUDriverPtr driver,
>      char ebuf[1024];
>      virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
>  
> -    VIR_DEBUG("Shutting down VM '%s' pid=%d flags=%x",
> -              vm->def->name, vm->pid, flags);
> +    VIR_DEBUG("Shutting down vm=%p name=%s id=%d pid=%d flags=%x",
> +              vm, vm->def->name, vm->def->id, vm->pid, flags);

and another.

ACK if you consistently print pid_t as %llu.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to