Get rid of the last debug sysctl variables of the old style.
This commit is contained in:
parent
9565c0e60d
commit
af8364b0ad
@ -209,7 +209,7 @@ nospace:
|
||||
#include <sys/sysctl.h>
|
||||
static int doasyncfree = 1;
|
||||
#ifdef OPT_DEBUG
|
||||
struct ctldebug debug14 = { "doasyncfree", &doasyncfree };
|
||||
SYSCTL_INT(_debug, 14, doasyncfree, CTLFLAG_RW, &doasyncfree, 0, "");
|
||||
#endif /* OPT_DEBUG */
|
||||
int
|
||||
ext2_reallocblks(ap)
|
||||
|
@ -242,9 +242,9 @@ struct vnodeopv_desc ext2fs_fifoop_opv_desc =
|
||||
#ifdef DEBUG
|
||||
#include <sys/sysctl.h>
|
||||
int doclusterread = 1;
|
||||
struct ctldebug debug11 = { "doclusterread", &doclusterread };
|
||||
SYSCTL_INT(_debug, 11, doclusterread, CTLFLAG_RW, &doclusterread, 0, "");
|
||||
int doclusterwrite = 1;
|
||||
struct ctldebug debug12 = { "doclusterwrite", &doclusterwrite };
|
||||
SYSCTL_INT(_debug, 12, doclusterwrite, CTLFLAG_RW, &doclusterwrite, 0, "");
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
|
@ -209,7 +209,7 @@ nospace:
|
||||
#include <sys/sysctl.h>
|
||||
static int doasyncfree = 1;
|
||||
#ifdef OPT_DEBUG
|
||||
struct ctldebug debug14 = { "doasyncfree", &doasyncfree };
|
||||
SYSCTL_INT(_debug, 14, doasyncfree, CTLFLAG_RW, &doasyncfree, 0, "");
|
||||
#endif /* OPT_DEBUG */
|
||||
int
|
||||
ext2_reallocblks(ap)
|
||||
|
@ -242,9 +242,9 @@ struct vnodeopv_desc ext2fs_fifoop_opv_desc =
|
||||
#ifdef DEBUG
|
||||
#include <sys/sysctl.h>
|
||||
int doclusterread = 1;
|
||||
struct ctldebug debug11 = { "doclusterread", &doclusterread };
|
||||
SYSCTL_INT(_debug, 11, doclusterread, CTLFLAG_RW, &doclusterread, 0, "");
|
||||
int doclusterwrite = 1;
|
||||
struct ctldebug debug12 = { "doclusterwrite", &doclusterwrite };
|
||||
SYSCTL_INT(_debug, 12, doclusterwrite, CTLFLAG_RW, &doclusterwrite, 0, "");
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94
|
||||
* $Id: kern_sysctl.c,v 1.46 1995/11/14 09:29:15 phk Exp $
|
||||
* $Id: kern_sysctl.c,v 1.47 1995/11/14 09:37:22 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -602,11 +602,6 @@ oldstuff:
|
||||
case CTL_FS:
|
||||
fn = fs_sysctl;
|
||||
break;
|
||||
#ifdef DEBUG
|
||||
case CTL_DEBUG:
|
||||
fn = debug_sysctl;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
return (EOPNOTSUPP);
|
||||
}
|
||||
@ -758,50 +753,6 @@ hw_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
/*
|
||||
* Debugging related system variables.
|
||||
*/
|
||||
struct ctldebug debug0, debug1, debug2, debug3, debug4;
|
||||
struct ctldebug debug5, debug6, debug7, debug8, debug9;
|
||||
struct ctldebug debug10, debug11, debug12, debug13, debug14;
|
||||
struct ctldebug debug15, debug16, debug17, debug18, debug19;
|
||||
static struct ctldebug *debugvars[CTL_DEBUG_MAXID] = {
|
||||
&debug0, &debug1, &debug2, &debug3, &debug4,
|
||||
&debug5, &debug6, &debug7, &debug8, &debug9,
|
||||
&debug10, &debug11, &debug12, &debug13, &debug14,
|
||||
&debug15, &debug16, &debug17, &debug18, &debug19,
|
||||
};
|
||||
static int
|
||||
debug_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
|
||||
int *name;
|
||||
u_int namelen;
|
||||
void *oldp;
|
||||
size_t *oldlenp;
|
||||
void *newp;
|
||||
size_t newlen;
|
||||
struct proc *p;
|
||||
{
|
||||
struct ctldebug *cdp;
|
||||
|
||||
/* all sysctl names at this level are name and field */
|
||||
if (namelen != 2)
|
||||
return (ENOTDIR); /* overloaded */
|
||||
cdp = debugvars[name[0]];
|
||||
if (cdp->debugname == 0)
|
||||
return (EOPNOTSUPP);
|
||||
switch (name[1]) {
|
||||
case CTL_DEBUG_NAME:
|
||||
return (sysctl_rdstring(oldp, oldlenp, newp, cdp->debugname));
|
||||
case CTL_DEBUG_VALUE:
|
||||
return (sysctl_int(oldp, oldlenp, newp, newlen, cdp->debugvar));
|
||||
default:
|
||||
return (EOPNOTSUPP);
|
||||
}
|
||||
/* NOTREACHED */
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
|
||||
/*
|
||||
* Validate parameters and get old / set new parameters
|
||||
* for an integer-valued sysctl function.
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)ffs_alloc.c 8.8 (Berkeley) 2/21/94
|
||||
* $Id: ffs_alloc.c,v 1.16 1995/08/25 19:40:26 bde Exp $
|
||||
* $Id: ffs_alloc.c,v 1.17 1995/09/08 17:16:32 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -327,7 +327,7 @@ nospace:
|
||||
#include <sys/sysctl.h>
|
||||
int doasyncfree = 1;
|
||||
#ifdef DEBUG
|
||||
struct ctldebug debug14 = { "doasyncfree", &doasyncfree };
|
||||
SYSCTL_INT(_debug, 14, doasyncfree, CTLFLAG_RW, &doasyncfree, 0, "");
|
||||
#endif
|
||||
int
|
||||
ffs_reallocblks(ap)
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)ffs_vnops.c 8.7 (Berkeley) 2/3/94
|
||||
* $Id: ffs_vnops.c,v 1.16 1995/10/23 02:23:07 dyson Exp $
|
||||
* $Id: ffs_vnops.c,v 1.17 1995/11/09 08:14:01 bde Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -224,9 +224,9 @@ VNODEOP_SET(ffs_fifoop_opv_desc);
|
||||
*/
|
||||
#include <sys/sysctl.h>
|
||||
int doclusterread = 1;
|
||||
struct ctldebug debug11 = { "doclusterread", &doclusterread };
|
||||
SYSCTL_INT(_debug, 11, doclusterread, CTLFLAG_RW, &doclusterread, 0, "");
|
||||
int doclusterwrite = 1;
|
||||
struct ctldebug debug12 = { "doclusterwrite", &doclusterwrite };
|
||||
SYSCTL_INT(_debug, 12, doclusterwrite, CTLFLAG_RW, &doclusterwrite, 0, "");
|
||||
#else
|
||||
/* XXX for ufs_readwrite */
|
||||
#define doclusterread 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user