From 43158ce31e659ccecf8610b44c997401ec70fd9c Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Mon, 26 Apr 2004 11:59:48 +0000 Subject: 2004-04-26 Ralf Corsepius * libnetworking/kern/kern_sysctl.c: Partial updates from FreeBSD. --- cpukit/ChangeLog | 4 ++++ cpukit/libnetworking/kern/kern_sysctl.c | 10 ++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'cpukit') diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 72cb2505bd..bc5b4c5e2c 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,7 @@ +2004-04-26 Ralf Corsepius + + * libnetworking/kern/kern_sysctl.c: Partial updates from FreeBSD. + 2004-04-26 Ralf Corsepius * libnetworking/netinet/igmp_var.h: Cosmetic updates from FreeBSD. diff --git a/cpukit/libnetworking/kern/kern_sysctl.c b/cpukit/libnetworking/kern/kern_sysctl.c index c0ba70cfc4..2a6293d0d4 100644 --- a/cpukit/libnetworking/kern/kern_sysctl.c +++ b/cpukit/libnetworking/kern/kern_sysctl.c @@ -95,7 +95,7 @@ static struct sx sysctllock; #else #define SYSCTL_LOCK() sx_xlock(&sysctllock) #define SYSCTL_UNLOCK() sx_xunlock(&sysctllock) -#define SYSCTL_INIT() sx_init(&sysctllock, "sysctl sysctllock") +#define SYSCTL_INIT() sx_init(&sysctllock, "sysctl lock") #endif static int sysctl_root(SYSCTL_HANDLER_ARGS); @@ -423,7 +423,7 @@ sysctl_add_oid(struct sysctl_ctx_list *clist, struct sysctl_oid_list *parent, */ SET_DECLARE(sysctl_set, struct sysctl_oid); -void +static void sysctl_register_all(void *arg) { struct sysctl_oid **oidp; @@ -587,7 +587,7 @@ sysctl_sysctl_next_ls(struct sysctl_oid_list *lsp, int *name, u_int namelen, if (!sysctl_sysctl_next_ls(lsp, 0, 0, next+1, len, level+1, oidpp)) return 0; - goto next; + goto emptynode; } if (oidp->oid_number < *name) @@ -616,6 +616,7 @@ sysctl_sysctl_next_ls(struct sysctl_oid_list *lsp, int *name, u_int namelen, return (0); next: namelen = 1; + emptynode: *len = level; } return 1; @@ -1077,7 +1078,7 @@ sysctl_new_user(struct sysctl_req *req, void *p, size_t l) * a place to save it in the sysctl_req structure so that the matching * amount of memory can be unwired in the sysctl exit code. */ -void +int sysctl_wire_old_buffer(struct sysctl_req *req, size_t len) { if (req->lock == REQ_LOCKED && req->oldptr && @@ -1087,6 +1088,7 @@ sysctl_wire_old_buffer(struct sysctl_req *req, size_t len) #endif req->lock = REQ_WIRED; } + return (0); } int -- cgit v1.2.3