Fix the reversed source and dest args to bcopy() in the kernel space
sysctl handler (ouch!) Add a "const" qualifier to the source of the copyin() and copyout() functions - the other const warning in kern_sysctl.c was silenced when copyout was declared as having a const source.. (which it is)
This commit is contained in:
parent
8735cebc64
commit
a1d2540fa0
@ -37,7 +37,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94
|
||||
* $Id: kern_sysctl.c,v 1.57 1995/12/14 08:31:36 phk Exp $
|
||||
* $Id: kern_sysctl.c,v 1.58 1995/12/17 21:11:22 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -721,7 +721,7 @@ sysctl_new_kernel(struct sysctl_req *req, const void *p, int l)
|
||||
return 0;
|
||||
if (req->newlen - req->newidx < l)
|
||||
return (EINVAL);
|
||||
bcopy(req->newptr + req->newidx, p, l);
|
||||
bcopy(p, req->newptr + req->newidx, l);
|
||||
req->newidx += l;
|
||||
return (0);
|
||||
}
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)systm.h 8.4 (Berkeley) 2/23/94
|
||||
* $Id: systm.h,v 1.27 1995/11/09 09:23:05 bde Exp $
|
||||
* $Id: systm.h,v 1.28 1995/12/28 23:34:30 davidg Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_SYSTM_H_
|
||||
@ -132,8 +132,8 @@ void *memcpy __P((void *to, const void *from, size_t len));
|
||||
int copystr __P((void *kfaddr, void *kdaddr, u_int len, u_int *done));
|
||||
int copyinstr __P((void *udaddr, void *kaddr, u_int len, u_int *done));
|
||||
int copyoutstr __P((void *kaddr, void *udaddr, u_int len, u_int *done));
|
||||
int copyin __P((void *udaddr, void *kaddr, u_int len));
|
||||
int copyout __P((void *kaddr, void *udaddr, u_int len));
|
||||
int copyin __P((const void *udaddr, void *kaddr, u_int len));
|
||||
int copyout __P((const void *kaddr, void *udaddr, u_int len));
|
||||
|
||||
int fubyte __P((void *base));
|
||||
int fuibyte __P((void *base));
|
||||
|
Loading…
Reference in New Issue
Block a user