Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-2-0]: src/sbin/sysctl Pull up revision 1.89 (requested by atatat ...



details:   https://anonhg.NetBSD.org/src/rev/20579f6be186
branches:  netbsd-2-0
changeset: 560324:20579f6be186
user:      jdc <jdc%NetBSD.org@localhost>
date:      Thu Apr 08 20:24:21 2004 +0000

description:
Pull up revision 1.89 (requested by atatat in ticket #92)

Don't copy the size that sysctl gave back directly, copy the size of
the description.

diffstat:

 sbin/sysctl/sysctl.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r eb8e58082e4b -r 20579f6be186 sbin/sysctl/sysctl.c
--- a/sbin/sysctl/sysctl.c      Thu Apr 08 20:22:45 2004 +0000
+++ b/sbin/sysctl/sysctl.c      Thu Apr 08 20:24:21 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sysctl.c,v 1.86.2.4 2004/04/08 20:22:45 jdc Exp $ */
+/*     $NetBSD: sysctl.c,v 1.86.2.5 2004/04/08 20:24:21 jdc Exp $ */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
 #if 0
 static char sccsid[] = "@(#)sysctl.c   8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: sysctl.c,v 1.86.2.4 2004/04/08 20:22:45 jdc Exp $");
+__RCSID("$NetBSD: sysctl.c,v 1.86.2.5 2004/04/08 20:24:21 jdc Exp $");
 #endif
 #endif /* not lint */
 
@@ -1441,7 +1441,7 @@
        if (desc == NULL)
                desc = (char *)-1;
        if (desc != (char *)-1)
-               memcpy(desc, &d->descr_str[0], sz);
+               memcpy(desc, &d->descr_str[0], d->descr_len);
        name[namelen - 1] = node.sysctl_num;
        if (pnode->sysctl_desc != NULL &&
            pnode->sysctl_desc != (const char *)-1)



Home | Main Index | Thread Index | Old Index