On 05/05/2011 02:44 PM, Cole Robinson wrote: > Log the full command line and a timestamp like we do for QEMU > > Signed-off-by: Cole Robinson <crobinso@xxxxxxxxxx> > --- > src/lxc/lxc_driver.c | 23 +++++++++++++++++++++++ > 1 files changed, 23 insertions(+), 0 deletions(-) > > > + /* Log timestamp */ > + if ((timestamp = virTimestamp()) == NULL) { > + virReportOOMError(); > + goto cleanup; > + } > + if (safewrite(logfile, timestamp, strlen(timestamp)) < 0 || > + safewrite(logfile, START_POSTFIX, strlen(START_POSTFIX)) < 0) { > + VIR_WARN("Unable to write timestamp to logfile: %s", > + virStrerror(errno, ebuf, sizeof ebuf)); > + } > + VIR_FREE(timestamp); Hmm, I know you just copied qemu_process.c, but should we be doing best effort to proceed (and just skip the timestamp output) if we are low on memory, rather than flat out giving up? But changing that should be a separate patch, since qemu should also be changed, so: ACK. -- 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