diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2004-04-26 11:59:48 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2004-04-26 11:59:48 +0000 |
commit | 43158ce31e659ccecf8610b44c997401ec70fd9c (patch) | |
tree | 812014021371948b0107917550a8ba55b52a9fb5 /cpukit/libnetworking/kern | |
parent | 2004-04-26 Ralf Corsepius <ralf_corsepius@rtems.org> (diff) | |
download | rtems-43158ce31e659ccecf8610b44c997401ec70fd9c.tar.bz2 |
2004-04-26 Ralf Corsepius <ralf_corsepius@rtems.org>
* libnetworking/kern/kern_sysctl.c: Partial updates from FreeBSD.
Diffstat (limited to 'cpukit/libnetworking/kern')
-rw-r--r-- | cpukit/libnetworking/kern/kern_sysctl.c | 10 |
1 files changed, 6 insertions, 4 deletions
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 |