summary refs log tree commit diff stats
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-12-18 02:39:59 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-12-18 02:39:59 +0000
commitc02f499e109916f60e99ef568ac2508ab4c20d82 (patch)
tree2841cbeb0d0296403d297616cc21fa1517ad81b8 /linux-user/syscall.c
parent3800af9e3cd6d754bcd0884006c404b6314b6732 (diff)
downloadfocaccia-qemu-c02f499e109916f60e99ef568ac2508ab4c20d82.tar.gz
focaccia-qemu-c02f499e109916f60e99ef568ac2508ab4c20d82.zip
Correct errno return for getsockopt(), by Thayne Harbaugh.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3838 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 4ebc8bbdb3..5159685e2b 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -996,14 +996,15 @@ static abi_long do_getsockopt(int sockfd, int level, int optname,
             }
             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;