Skip to contentSkip to conversation

getsockopt() errno

PATCH New Thayne Harbaugh 1 participant 1 message Dec 13, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 getsockopt() errno

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

linux-user/syscall.c +3 -2
Index: qemu/linux-user/syscall.c
===================================================================
@@ -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;