[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] FD passing for chardevs and chardev backend multiplexin
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] FD passing for chardevs and chardev backend multiplexing |
Date: |
Wed, 9 Dec 2015 14:11:56 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 09/12/2015 12:19, Daniel P. Berrange wrote:
> > > Now in practice this doesn't work, because qmp_chardev_open_file()
> > > passes the O_CREAT|O_TRUNC flags in, which means the qemu_open()
> > > call will fail when using the pipe FD pased in via fdsets.
> >
> > Is it just the O_TRUNC that is failing? If so, there is a recent patch
> > to add an 'append':true flag that switches O_TRUNC off in favor of O_APPEND:
> > https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg00762.html
>
> Yes, it is the ftruncate() call in qemu_dup_flags, called from qemu_open
> that is failing.
It will require a little auditing, but I think ignoring EINVAL from that
fruncate() is fine.
Paolo