Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Jun 2000 17:40:04 -0700 (PDT)
From:      Kelly Yancey <kbyanc@posi.net>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/15251: patch to add unsigned support to sysctl
Message-ID:  <200006260040.RAA36097@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/15251; it has been noted by GNATS.

From: Kelly Yancey <kbyanc@posi.net>
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200006260040.RAA36097>