Re: [PATCH 4/5] Add a qemuDomainAppendLog method for writing to the domain logfile

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

 



On 05/05/2011 05:51 AM, Daniel P. Berrange wrote:
> The qemuDomainAppendLog method allows writing a formatted string
> to the end of the domain logfile, optionally opening it if needed.
> 
> * src/qemu/qemu_domain.c, src/qemu/qemu_domain.h: Add
>   qemuDomainAppendLog
> ---
>  src/qemu/qemu_domain.c |   37 +++++++++++++++++++++++++++++++++++++
>  src/qemu/qemu_domain.h |    4 ++++
>  2 files changed, 41 insertions(+), 0 deletions(-)
> 

> +++ b/src/qemu/qemu_domain.c
> @@ -888,3 +888,40 @@ qemuDomainOpenLog(struct qemud_driver *driver, virDomainObjPtr vm, off_t pos)
>  }
>  
>  
> +ATTRIBUTE_FMT_PRINTF(4, 5)
> +int qemuDomainAppendLog(struct qemud_driver *driver,

If you put the ATTRIBUTE_FMT_PRINTF in the .h, then you don't need to
copy it here.  Plus, it will actually cause the compiler to do checking
for files other than qemu_domain.c.

> +++ b/src/qemu/qemu_domain.h
> @@ -131,5 +131,9 @@ void qemuDomainObjCheckNetTaint(struct qemud_driver *driver,
>  
>  int qemuDomainCreateLog(struct qemud_driver *driver, virDomainObjPtr vm, bool append);
>  int qemuDomainOpenLog(struct qemud_driver *driver, virDomainObjPtr vm, off_t pos);
> +int qemuDomainAppendLog(struct qemud_driver *driver,
> +                        virDomainObjPtr vm,
> +                        int logFD,
> +                        const char *fmt, ...);

ACK with the ATTRIBUTE moved to the .h.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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