From eed203ed542c00de5206327a140cc7018c0f6e82 Mon Sep 17 00:00:00 2001 From: dsl Date: Sun, 28 Sep 2003 13:24:48 +0000 Subject: [PATCH] Simod has persuaded me to remove the 'sizeof (struct kinfo_drivers)' field. --- sys/kern/kern_sysctl.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index a56a747945e5..dfd3898b00ee 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_sysctl.c,v 1.145 2003/09/27 07:58:55 dsl Exp $ */ +/* $NetBSD: kern_sysctl.c,v 1.146 2003/09/28 13:24:48 dsl Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.145 2003/09/27 07:58:55 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.146 2003/09/28 13:24:48 dsl Exp $"); #include "opt_ddb.h" #include "opt_insecure.h" @@ -1302,7 +1302,7 @@ sysctl_drivers(void *vwhere, size_t *sizep) start = where = vwhere; buflen = *sizep; if (where == NULL) { - *sizep = sizeof (int32_t) + max_devsw_convs * sizeof kd; + *sizep = max_devsw_convs * sizeof kd; return 0; } @@ -1310,12 +1310,6 @@ sysctl_drivers(void *vwhere, size_t *sizep) * An array of kinfo_drivers structures */ error = 0; - if (buflen >= sizeof (int32_t)) { - int32_t l = sizeof kd; - error = copyout(&l, where, sizeof (int32_t)); - where += sizeof (int32_t); - buflen -= sizeof (int32_t); - } for (i = 0; i < max_devsw_convs; i++) { name = devsw_conv[i].d_name; if (name == NULL)