diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-04-22 09:14:34 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-04-22 09:25:11 +0200 |
commit | 1641088178538e4ae409d53bbcbbb06fa80ffca0 (patch) | |
tree | 6b32afcc32f8f82c2e20c517bdbc71e14afae7f2 /cpukit/libnetworking/kern | |
parent | network: Delete unused in4_cksum() (diff) | |
download | rtems-1641088178538e4ae409d53bbcbbb06fa80ffca0.tar.bz2 |
network: Ensure matching syscall prototypes
Ensure that kernel and user space system call protoypes are identical.
Diffstat (limited to 'cpukit/libnetworking/kern')
-rw-r--r-- | cpukit/libnetworking/kern/kern_sysctl.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/cpukit/libnetworking/kern/kern_sysctl.c b/cpukit/libnetworking/kern/kern_sysctl.c index 993c20f5d2..e2de690d55 100644 --- a/cpukit/libnetworking/kern/kern_sysctl.c +++ b/cpukit/libnetworking/kern/kern_sysctl.c @@ -94,7 +94,8 @@ static struct sx sysctllock; #define SYSCTL_INIT() sx_init(&sysctllock, "sysctl lock") #endif -static int sysctl_root(SYSCTL_HANDLER_ARGS); +static int sysctl_root(struct sysctl_oid *oidp, const void *arg1, + intptr_t arg2, struct sysctl_req *req); struct sysctl_oid_list sysctl__children; /* root list */ @@ -1094,7 +1095,7 @@ sysctl_wire_old_buffer(struct sysctl_req *req, size_t len) } int -sysctl_find_oid(int *name, u_int namelen, struct sysctl_oid **noid, +sysctl_find_oid(const int *name, u_int namelen, struct sysctl_oid **noid, int *nindx, struct sysctl_req *req) { struct sysctl_oid *oid; @@ -1138,7 +1139,8 @@ sysctl_find_oid(int *name, u_int namelen, struct sysctl_oid **noid, */ static int -sysctl_root(SYSCTL_HANDLER_ARGS) +sysctl_root(struct sysctl_oid *oidp, const void *arg1, intptr_t arg2, + struct sysctl_req *req) { struct sysctl_oid *oid; int error, indx; @@ -1197,6 +1199,7 @@ sysctl_root(SYSCTL_HANDLER_ARGS) return (error); } +#ifndef __rtems__ #ifndef _SYS_SYSPROTO_H_ struct sysctl_args { int *name; @@ -1240,14 +1243,15 @@ done2: mtx_unlock(&Giant); return (error); } +#endif /* __rtems__ */ /* * This is used from various compatibility syscalls too. That's why name * must be in kernel space. */ int -userland_sysctl(struct thread *td, int *name, u_int namelen, void *old, - size_t *oldlenp, int inkernel, void *new, size_t newlen, size_t *retval) +userland_sysctl(struct thread *td, const int *name, u_int namelen, void *old, + size_t *oldlenp, int inkernel, const void *new, size_t newlen, size_t *retval) { int error = 0; struct sysctl_req req, req2; |