Make the variable types, the sysctl macros and the sysctl handler for

kern.ipc.{maxsockbuf,sockbuf_waste_factor} to agree that those variables
are of type unsigned long.

PR:		sparc64/47389
Approved by:	jake (mentor)
This commit is contained in:
Hartmut Brandt 2003-02-03 06:50:59 +00:00
parent 5d7ef00cfe
commit 1b978d453b
2 changed files with 10 additions and 10 deletions

View File

@ -383,10 +383,10 @@ sysctl_handle_sb_max(SYSCTL_HANDLER_ARGS)
int error = 0;
u_long old_sb_max = sb_max;
error = SYSCTL_OUT(req, arg1, sizeof(int));
error = SYSCTL_OUT(req, arg1, sizeof(u_long));
if (error || !req->newptr)
return (error);
error = SYSCTL_IN(req, arg1, sizeof(int));
error = SYSCTL_IN(req, arg1, sizeof(u_long));
if (error)
return (error);
if (sb_max < MSIZE + MCLBYTES) {
@ -989,11 +989,11 @@ SYSCTL_NODE(_kern, KERN_IPC, ipc, CTLFLAG_RW, 0, "IPC");
/* This takes the place of kern.maxsockbuf, which moved to kern.ipc. */
static int dummy;
SYSCTL_INT(_kern, KERN_DUMMY, dummy, CTLFLAG_RW, &dummy, 0, "");
SYSCTL_OID(_kern_ipc, KIPC_MAXSOCKBUF, maxsockbuf, CTLTYPE_INT|CTLFLAG_RW,
&sb_max, 0, sysctl_handle_sb_max, "I", "Maximum socket buffer size");
SYSCTL_OID(_kern_ipc, KIPC_MAXSOCKBUF, maxsockbuf, CTLTYPE_ULONG|CTLFLAG_RW,
&sb_max, 0, sysctl_handle_sb_max, "LU", "Maximum socket buffer size");
SYSCTL_INT(_kern_ipc, OID_AUTO, maxsockets, CTLFLAG_RD,
&maxsockets, 0, "Maximum number of sockets avaliable");
SYSCTL_INT(_kern_ipc, KIPC_SOCKBUF_WASTE, sockbuf_waste_factor, CTLFLAG_RW,
SYSCTL_ULONG(_kern_ipc, KIPC_SOCKBUF_WASTE, sockbuf_waste_factor, CTLFLAG_RW,
&sb_efficiency, 0, "");
/*

View File

@ -383,10 +383,10 @@ sysctl_handle_sb_max(SYSCTL_HANDLER_ARGS)
int error = 0;
u_long old_sb_max = sb_max;
error = SYSCTL_OUT(req, arg1, sizeof(int));
error = SYSCTL_OUT(req, arg1, sizeof(u_long));
if (error || !req->newptr)
return (error);
error = SYSCTL_IN(req, arg1, sizeof(int));
error = SYSCTL_IN(req, arg1, sizeof(u_long));
if (error)
return (error);
if (sb_max < MSIZE + MCLBYTES) {
@ -989,11 +989,11 @@ SYSCTL_NODE(_kern, KERN_IPC, ipc, CTLFLAG_RW, 0, "IPC");
/* This takes the place of kern.maxsockbuf, which moved to kern.ipc. */
static int dummy;
SYSCTL_INT(_kern, KERN_DUMMY, dummy, CTLFLAG_RW, &dummy, 0, "");
SYSCTL_OID(_kern_ipc, KIPC_MAXSOCKBUF, maxsockbuf, CTLTYPE_INT|CTLFLAG_RW,
&sb_max, 0, sysctl_handle_sb_max, "I", "Maximum socket buffer size");
SYSCTL_OID(_kern_ipc, KIPC_MAXSOCKBUF, maxsockbuf, CTLTYPE_ULONG|CTLFLAG_RW,
&sb_max, 0, sysctl_handle_sb_max, "LU", "Maximum socket buffer size");
SYSCTL_INT(_kern_ipc, OID_AUTO, maxsockets, CTLFLAG_RD,
&maxsockets, 0, "Maximum number of sockets avaliable");
SYSCTL_INT(_kern_ipc, KIPC_SOCKBUF_WASTE, sockbuf_waste_factor, CTLFLAG_RW,
SYSCTL_ULONG(_kern_ipc, KIPC_SOCKBUF_WASTE, sockbuf_waste_factor, CTLFLAG_RW,
&sb_efficiency, 0, "");
/*