From: Corey Bryant <coreyb@linux.vnet.ibm.com>
To: Stefan Weil <sw@weilnetz.de>
Cc: kwolf@redhat.com, agraf@suse.de, gollub@b1-systems.de,
qemu-devel@nongnu.org, lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [PATCH] main: Hide F_GETFD and FD_CLOEXEC use for _WIN32
Date: Mon, 22 Oct 2012 13:35:40 -0400 [thread overview]
Message-ID: <508583EC.8090301@linux.vnet.ibm.com> (raw)
In-Reply-To: <50857425.3020607@weilnetz.de>
On 10/22/2012 12:28 PM, Stefan Weil wrote:
> Am 22.10.2012 15:53, schrieb Corey Bryant:
>> Signed-off-by: Corey Bryant<coreyb@linux.vnet.ibm.com>
>> ---
>> vl.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/vl.c b/vl.c
>> index 200d849..94c667d 100644
>> --- a/vl.c
>> +++ b/vl.c
>> @@ -812,11 +812,13 @@ static int parse_add_fd(QemuOpts *opts, void
>> *opaque)
>> return -1;
>> }
>>
>> +#ifndef _WIN32
>> if (fcntl(fd, F_GETFD)& FD_CLOEXEC) {
>> qerror_report(ERROR_CLASS_GENERIC_ERROR,
>> "fd is not valid or already in use");
>> return -1;
>> }
>> +#endif
>>
>> if (fdset_id< 0) {
>> qerror_report(ERROR_CLASS_GENERIC_ERROR,
>
>
> Are you sure that all other hosts provide F_GETFD and FD_CLOEXEC
> and that MinGW will never do that?
I don't know for sure but use of F_GETFD and FD_CLOEXEC broke the build
for MinGW.
> Maybe testing those two macros instead of _WIN32 would be better:
>
> #if defined(F_GETFD) && defined(FD_CLOEXEC)
> ...
> #endif
>
> I also think that this patch should be merged with the one which adds
> that code and not applied as a separate patch (otherwise git bisect would
> be broken).
Kevin ended up providing a fix for this in "[PATCH v5] qemu-config: Add
new -add-fd command line option" which fails the -add-fd command for
Windows. This is in-line with how the QMP add-fd command behaves.
--
Regards,
Corey Bryant
prev parent reply other threads:[~2012-10-22 17:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-22 13:53 [Qemu-devel] [PATCH] main: Hide F_GETFD and FD_CLOEXEC use for _WIN32 Corey Bryant
2012-10-22 16:16 ` Luiz Capitulino
2012-10-22 17:46 ` Corey Bryant
2012-10-23 9:47 ` Kevin Wolf
2012-10-22 16:28 ` Stefan Weil
2012-10-22 17:35 ` Corey Bryant [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=508583EC.8090301@linux.vnet.ibm.com \
--to=coreyb@linux.vnet.ibm.com \
--cc=agraf@suse.de \
--cc=gollub@b1-systems.de \
--cc=kwolf@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sw@weilnetz.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).