qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [BUG][PATCH] getsockopt() errno
@ 2007-12-13  3:56 Thayne Harbaugh
  0 siblings, 0 replies; only message in thread
From: Thayne Harbaugh @ 2007-12-13  3:56 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 156 bytes --]

linux-user getsockopt() doesn't return the correct errnos for certain
cases.  This fixes errnos for unsupported levels and unsupported SOL_IP
option names.

[-- Attachment #2: 10_getsockopt_errnos.patch --]
[-- Type: text/x-patch, Size: 682 bytes --]

Index: qemu/linux-user/syscall.c
===================================================================
--- qemu.orig/linux-user/syscall.c	2007-12-12 20:48:56.000000000 -0700
+++ qemu/linux-user/syscall.c	2007-12-12 20:50:05.000000000 -0700
@@ -1010,14 +1010,15 @@
             }
             break;
         default:
-            goto unimplemented;
+            ret = -TARGET_ENOPROTOOPT;
+            break;
         }
         break;
     default:
     unimplemented:
         gemu_log("getsockopt level=%d optname=%d not yet supported\n",
                  level, optname);
-        ret = -TARGET_ENOSYS;
+        ret = -TARGET_EOPNOTSUPP;
         break;
     }
     return ret;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-12-13  4:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-13  3:56 [Qemu-devel] [BUG][PATCH] getsockopt() errno Thayne Harbaugh

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