On 06/25/2012 11:26 AM, Kevin Wolf wrote:
Am 25.06.2012 16:34, schrieb Eric Blake:
Also, I noticed in the fnctl man page that F_SETFL: "On Linux this
command can change only the O_APPEND, O_ASYNC, O_DIRECT, O_NOATIME, and
O_NONBLOCK flags." So I'll only set/unset these flags.
O_NDELAY is t
On 06/25/2012 10:34 AM, Eric Blake wrote:
On 06/25/2012 08:24 AM, Corey Bryant wrote:
+if (fcntl_setfl(ret, O_CLOEXEC, (flags & O_CLOEXEC) ? 1
: 0) < 0) {
Broken. O_CLOEXEC _only_ affects open(); to change it on an existing
fd, you have to use fcntl(F_GETFD/F_SETFD) (not F_GETF
On 06/25/2012 10:34 AM, Eric Blake wrote:
On 06/25/2012 08:24 AM, Corey Bryant wrote:
+if (fcntl_setfl(ret, O_CLOEXEC, (flags & O_CLOEXEC) ? 1
: 0) < 0) {
Broken. O_CLOEXEC _only_ affects open(); to change it on an existing
fd, you have to use fcntl(F_GETFD/F_SETFD) (not F_GETF
Am 25.06.2012 16:34, schrieb Eric Blake:
>> Also, I noticed in the fnctl man page that F_SETFL: "On Linux this
>> command can change only the O_APPEND, O_ASYNC, O_DIRECT, O_NOATIME, and
>> O_NONBLOCK flags." So I'll only set/unset these flags.
>
> O_NDELAY is the obsolete spelling of O_NONBLOCK;
On 06/25/2012 08:24 AM, Corey Bryant wrote:
>>> +if (fcntl_setfl(ret, O_CLOEXEC, (flags & O_CLOEXEC) ? 1
>>> : 0) < 0) {
>>
>> Broken. O_CLOEXEC _only_ affects open(); to change it on an existing
>> fd, you have to use fcntl(F_GETFD/F_SETFD) (not F_GETFL/F_SETFL).
>>
>>
>
> I'll fix
On 06/22/2012 03:58 PM, Eric Blake wrote:
On 06/22/2012 12:36 PM, Corey Bryant wrote:
This patch adds support to qemu_open to dup(fd) a pre-opened file
descriptor if the filename is of the format /dev/fd/X.
This can be used when QEMU is restricted from opening files, and
the management applic
On 06/22/2012 12:36 PM, Corey Bryant wrote:
> This patch adds support to qemu_open to dup(fd) a pre-opened file
> descriptor if the filename is of the format /dev/fd/X.
>
> This can be used when QEMU is restricted from opening files, and
> the management application opens files on QEMU's behalf.
>
This patch adds support to qemu_open to dup(fd) a pre-opened file
descriptor if the filename is of the format /dev/fd/X.
This can be used when QEMU is restricted from opening files, and
the management application opens files on QEMU's behalf.
If the fd was passed to the monitor with the pass-fd c