qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] osdep.c: Fix accept4 fallback
@ 2010-01-13 15:20 Kevin Wolf
  2010-01-13 23:28 ` Anthony Liguori
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Wolf @ 2010-01-13 15:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf

Commit 3a03bfa5 added a fallback in case the Linux kernel running qemu is older
than the kernel of the build system. Unfortunately, v1 was committed instead of
v2, so the code has a bug that was revealed in the review (checking for the
wrong error code).

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 osdep.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/osdep.c b/osdep.c
index e4836e7..1310684 100644
--- a/osdep.c
+++ b/osdep.c
@@ -297,7 +297,7 @@ int qemu_accept(int s, struct sockaddr *addr, socklen_t *addrlen)
 
 #ifdef CONFIG_ACCEPT4
     ret = accept4(s, addr, addrlen, SOCK_CLOEXEC);
-    if (ret != -1 || errno != EINVAL) {
+    if (ret != -1 || errno != ENOSYS) {
         return ret;
     }
 #endif
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] osdep.c: Fix accept4 fallback
  2010-01-13 15:20 [Qemu-devel] [PATCH] osdep.c: Fix accept4 fallback Kevin Wolf
@ 2010-01-13 23:28 ` Anthony Liguori
  0 siblings, 0 replies; 2+ messages in thread
From: Anthony Liguori @ 2010-01-13 23:28 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-devel

On 01/13/2010 09:20 AM, Kevin Wolf wrote:
> Commit 3a03bfa5 added a fallback in case the Linux kernel running qemu is older
> than the kernel of the build system. Unfortunately, v1 was committed instead of
> v2, so the code has a bug that was revealed in the review (checking for the
> wrong error code).
>
> Signed-off-by: Kevin Wolf<kwolf@redhat.com>
>    

Applied.  Thanks.

Regards,

Anthony Liguori
> ---
>   osdep.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/osdep.c b/osdep.c
> index e4836e7..1310684 100644
> --- a/osdep.c
> +++ b/osdep.c
> @@ -297,7 +297,7 @@ int qemu_accept(int s, struct sockaddr *addr, socklen_t *addrlen)
>
>   #ifdef CONFIG_ACCEPT4
>       ret = accept4(s, addr, addrlen, SOCK_CLOEXEC);
> -    if (ret != -1 || errno != EINVAL) {
> +    if (ret != -1 || errno != ENOSYS) {
>           return ret;
>       }
>   #endif
>    

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-13 23:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-13 15:20 [Qemu-devel] [PATCH] osdep.c: Fix accept4 fallback Kevin Wolf
2010-01-13 23:28 ` Anthony Liguori

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).