Re: [PATCH v2 08/13] qemu: convert log file creation to use qemuDomainLogContextPtr

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

 




On 11/12/2015 12:19 PM, Daniel P. Berrange wrote:
> Convert the places which create/open log files to use the new
> qemuDomainLogContextPtr object instead.
> 
> Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> ---
>  src/qemu/qemu_domain.c  | 100 +++++-------------------------------------------
>  src/qemu/qemu_domain.h  |   2 -
>  src/qemu/qemu_process.c |  78 +++++++++++++++++--------------------
>  3 files changed, 46 insertions(+), 134 deletions(-)
> 

[...]

> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c

[...]

> @@ -4854,7 +4850,7 @@ int qemuProcessStart(virConnectPtr conn,
>  
>   cleanup:
>      virCommandFree(cmd);
> -    VIR_FORCE_CLOSE(logfile);
> +    qemuDomainLogContextFree(logCtxt);
>      virObjectUnref(cfg);
>      virObjectUnref(caps);
>      VIR_FREE(nicindexes);
> @@ -4868,6 +4864,9 @@ int qemuProcessStart(virConnectPtr conn,
>       * pretend we never started it */
>      if (priv->mon)
>          qemuMonitorSetDomainLog(priv->mon, -1, -1);
> +    /* Must close log now to allow ProcessSto to re-open it */

ProcessStop  (almost not worth mentioning ;-))

> +    qemuDomainLogContextFree(logCtxt);
> +    logCtxt = NULL;
>      qemuProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_FAILED, stop_flags);
>      goto cleanup;
>  

[...]

ACK

John

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