
9 Dec
2015
9 Dec
'15
1:11 p.m.
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