aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett Wollman <wollman@FreeBSD.org>1998-08-31 18:07:23 +0000
committerGarrett Wollman <wollman@FreeBSD.org>1998-08-31 18:07:23 +0000
commit9898afa1f14253d2fe861c4f6fb75fcbb012c3d3 (patch)
tree243da60c969401da25e5fc716c628bf6451208ae
parent119cff04efba2e8b159606db46ae1fac30875d0f (diff)
Notes
-rw-r--r--sys/kern/uipc_socket.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index defd2a8744e3..05d312f65302 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)uipc_socket.c 8.3 (Berkeley) 4/15/94
- * $Id: uipc_socket.c,v 1.43 1998/08/23 03:06:59 wollman Exp $
+ * $Id: uipc_socket.c,v 1.44 1998/08/31 15:34:55 wollman Exp $
*/
#include <sys/param.h>
@@ -1078,13 +1078,14 @@ sooptcopyout(sopt, buf, len)
/*
* Documented get behavior is that we always return a value,
* possibly truncated to fit in the user's buffer.
- * We leave the correct length in sopt->sopt_valsize,
- * to be copied out in getsockopt(). Note that this
- * interface is not idempotent; the entire answer must
+ * Traditional behavior is that we always tell the user
+ * precisely how much we copied, rather than something useful
+ * like the total amount we had available for her.
+ * Note that this interface is not idempotent; the entire answer must
* generated ahead of time.
*/
valsize = min(len, sopt->sopt_valsize);
- sopt->sopt_valsize = len;
+ sopt->sopt_valsize = valsize;
if (sopt->sopt_val != 0) {
if (sopt->sopt_p != 0)
error = copyout(buf, sopt->sopt_val, valsize);