Re: [Qemu-devel] [PATCH v2] qemu-char: add logfile facility to all chardev backends

2015-12-23 Thread Eric Blake
On 12/23/2015 04:32 AM, Daniel P. Berrange wrote: > On Tue, Dec 22, 2015 at 12:07:03PM -0700, Eric Blake wrote: >> On 12/22/2015 11:17 AM, Daniel P. Berrange wrote: >>> Typically a UNIX guest OS will log boot messages to a serial >>> port in addition to any graphical console. An admin user >>> may

Re: [Qemu-devel] [PATCH v2] qemu-char: add logfile facility to all chardev backends

2015-12-23 Thread Eric Blake
On 12/23/2015 04:24 AM, Daniel P. Berrange wrote: > On Tue, Dec 22, 2015 at 11:45:45AM -0700, Eric Blake wrote: >> On 12/22/2015 11:17 AM, Daniel P. Berrange wrote: >>> Typically a UNIX guest OS will log boot messages to a serial >>> port in addition to any graphical console. An admin user >>> may

Re: [Qemu-devel] [PATCH v2] qemu-char: add logfile facility to all chardev backends

2015-12-23 Thread Daniel P. Berrange
On Wed, Dec 23, 2015 at 12:34:25PM +0100, Paolo Bonzini wrote: > > > On 22/12/2015 19:17, Daniel P. Berrange wrote: > > +if (common->has_logfile) { > > +int flags = O_WRONLY | O_CREAT; > > +if (!common->has_logappend || > > +!common->logappend) { > > +f

Re: [Qemu-devel] [PATCH v2] qemu-char: add logfile facility to all chardev backends

2015-12-23 Thread Paolo Bonzini
On 22/12/2015 19:17, Daniel P. Berrange wrote: > +if (common->has_logfile) { > +int flags = O_WRONLY | O_CREAT; > +if (!common->has_logappend || > +!common->logappend) { > +flags |= O_TRUNC; > +} Should it use O_APPEND if logappend is absent or

Re: [Qemu-devel] [PATCH v2] qemu-char: add logfile facility to all chardev backends

2015-12-23 Thread Daniel P. Berrange
On Tue, Dec 22, 2015 at 12:07:03PM -0700, Eric Blake wrote: > On 12/22/2015 11:17 AM, Daniel P. Berrange wrote: > > Typically a UNIX guest OS will log boot messages to a serial > > port in addition to any graphical console. An admin user > > may also wish to use the serial port for an interactive >

Re: [Qemu-devel] [PATCH v2] qemu-char: add logfile facility to all chardev backends

2015-12-23 Thread Daniel P. Berrange
On Tue, Dec 22, 2015 at 11:45:45AM -0700, Eric Blake wrote: > On 12/22/2015 11:17 AM, Daniel P. Berrange wrote: > > Typically a UNIX guest OS will log boot messages to a serial > > port in addition to any graphical console. An admin user > > may also wish to use the serial port for an interactive >

Re: [Qemu-devel] [PATCH v2] qemu-char: add logfile facility to all chardev backends

2015-12-22 Thread Eric Blake
On 12/22/2015 11:17 AM, Daniel P. Berrange wrote: > Typically a UNIX guest OS will log boot messages to a serial > port in addition to any graphical console. An admin user > may also wish to use the serial port for an interactive > console. A virtualization management system may wish to > collect s

Re: [Qemu-devel] [PATCH v2] qemu-char: add logfile facility to all chardev backends

2015-12-22 Thread Eric Blake
On 12/22/2015 11:17 AM, Daniel P. Berrange wrote: > Typically a UNIX guest OS will log boot messages to a serial > port in addition to any graphical console. An admin user > may also wish to use the serial port for an interactive > console. A virtualization management system may wish to > collect s

[Qemu-devel] [PATCH v2] qemu-char: add logfile facility to all chardev backends

2015-12-22 Thread Daniel P. Berrange
Typically a UNIX guest OS will log boot messages to a serial port in addition to any graphical console. An admin user may also wish to use the serial port for an interactive console. A virtualization management system may wish to collect system boot messages by logging the serial port, but also wis