From owner-freebsd-bugs Sun Jun 25 17:40: 8 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id DC69337B655 for ; Sun, 25 Jun 2000 17:40:05 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id RAA36097; Sun, 25 Jun 2000 17:40:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Sun, 25 Jun 2000 17:40:04 -0700 (PDT) Message-Id: <200006260040.RAA36097@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Kelly Yancey Subject: Re: kern/15251: patch to add unsigned support to sysctl Reply-To: Kelly Yancey Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR kern/15251; it has been noted by GNATS. From: Kelly Yancey To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: Re: kern/15251: patch to add unsigned support to sysctl Date: Sun, 25 Jun 2000 17:38:48 -0700 (PDT) When updating the original patches to -current, I left out the fix to use the correct datatype for sysctl's in vfs_cache.c (see original PR notes for details of the bug). Here is a patch, to be applied after the last patchset I attached to this PR, which fixes the datatype mismatch in vfs_cache.c. In short, the latest patchset against current is already attached to this PR (as a shar of 5 'bite-size' patches). Commit that. Then, apply this patch and commit that. Kelly --- sys/kern/vfs_cache.c.orig Sun Jun 25 17:30:44 2000 +++ sys/kern/vfs_cache.c Sun Jun 25 17:33:04 2000 @@ -90,13 +90,13 @@ static LIST_HEAD(nchashhead, namecache) *nchashtbl; /* Hash Table */ static TAILQ_HEAD(, namecache) ncneg; /* Hash Table */ static u_long nchash; /* size of hash table */ -SYSCTL_UINT(_debug, OID_AUTO, nchash, CTLFLAG_RD, &nchash, 0, ""); +SYSCTL_ULONG(_debug, OID_AUTO, nchash, CTLFLAG_RD, &nchash, 0, ""); static u_long ncnegfactor = 16; /* ratio of negative entries */ -SYSCTL_UINT(_debug, OID_AUTO, ncnegfactor, CTLFLAG_RW, &ncnegfactor, 0, ""); +SYSCTL_ULONG(_debug, OID_AUTO, ncnegfactor, CTLFLAG_RW, &ncnegfactor, 0, ""); static u_long numneg; /* number of cache entries allocated */ -SYSCTL_UINT(_debug, OID_AUTO, numneg, CTLFLAG_RD, &numneg, 0, ""); +SYSCTL_ULONG(_debug, OID_AUTO, numneg, CTLFLAG_RD, &numneg, 0, ""); static u_long numcache; /* number of cache entries allocated */ -SYSCTL_UINT(_debug, OID_AUTO, numcache, CTLFLAG_RD, &numcache, 0, ""); +SYSCTL_ULONG(_debug, OID_AUTO, numcache, CTLFLAG_RD, &numcache, 0, ""); struct nchstats nchstats; /* cache effectiveness statistics */ static int doingcache = 1; /* 1 => enable the cache */ @@ -109,7 +109,7 @@ */ SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW, 0, "Name cache statistics"); #define STATNODE(mode, name, var) \ - SYSCTL_UINT(_vfs_cache, OID_AUTO, name, mode, var, 0, ""); + SYSCTL_ULONG(_vfs_cache, OID_AUTO, name, mode, var, 0, ""); STATNODE(CTLFLAG_RD, numneg, &numneg); STATNODE(CTLFLAG_RD, numcache, &numcache); static u_long numcalls; STATNODE(CTLFLAG_RD, numcalls, &numcalls); -- Kelly Yancey - kbyanc@posi.net - Belmont, CA System Administrator, eGroups.com http://www.egroups.com/ Maintainer, BSD Driver Database http://www.posi.net/freebsd/drivers/ Coordinator, Team FreeBSD http://www.posi.net/freebsd/Team-FreeBSD/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message