From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J2fK2-0007f2-4s for qemu-devel@nongnu.org; Wed, 12 Dec 2007 23:05:18 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J2fJz-0007bh-Vw for qemu-devel@nongnu.org; Wed, 12 Dec 2007 23:05:17 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J2fJz-0007bb-T9 for qemu-devel@nongnu.org; Wed, 12 Dec 2007 23:05:15 -0500 Received: from owa.c2.net ([207.235.78.2] helo=email.c2.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J2fJz-00069Q-Ax for qemu-devel@nongnu.org; Wed, 12 Dec 2007 23:05:15 -0500 From: Thayne Harbaugh Content-Type: multipart/mixed; boundary="=-I7iKqX96iPhBWSwKwOJl" Date: Wed, 12 Dec 2007 20:56:33 -0700 Message-Id: <1197518194.3640.7.camel@phantasm.home.enterpriseandprosperity.com> Mime-Version: 1.0 Subject: [Qemu-devel] [BUG][PATCH] getsockopt() errno Reply-To: thayne@c2.net, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --=-I7iKqX96iPhBWSwKwOJl Content-Type: text/plain Content-Transfer-Encoding: 7bit linux-user getsockopt() doesn't return the correct errnos for certain cases. This fixes errnos for unsupported levels and unsupported SOL_IP option names. --=-I7iKqX96iPhBWSwKwOJl Content-Disposition: attachment; filename=10_getsockopt_errnos.patch Content-Type: text/x-patch; name=10_getsockopt_errnos.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit 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; --=-I7iKqX96iPhBWSwKwOJl--