make struct linux_oldmmap members explicitly unsigned (with exception
of lm_fd, which can be -1), rename lm_pos to lm_offset, g/c some unneeded casts no functional change
This commit is contained in:
parent
fe9a74b763
commit
c341a3a03a
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_oldmmap.c,v 1.61 2003/01/18 08:04:38 thorpej Exp $ */
|
||||
/* $NetBSD: linux_oldmmap.c,v 1.62 2004/08/22 15:40:41 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_oldmmap.c,v 1.61 2003/01/18 08:04:38 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_oldmmap.c,v 1.62 2004/08/22 15:40:41 jdolecek Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -86,18 +86,18 @@ linux_sys_old_mmap(l, v, retval)
|
|||
if ((error = copyin(SCARG(uap, lmp), &lmap, sizeof lmap)))
|
||||
return error;
|
||||
|
||||
if (lmap.lm_pos & PAGE_MASK)
|
||||
if (lmap.lm_offset & PAGE_MASK)
|
||||
return EINVAL;
|
||||
|
||||
SCARG(&nlmap,addr) = (unsigned long)lmap.lm_addr;
|
||||
SCARG(&nlmap,addr) = lmap.lm_addr;
|
||||
SCARG(&nlmap,len) = lmap.lm_len;
|
||||
SCARG(&nlmap,prot) = lmap.lm_prot;
|
||||
SCARG(&nlmap,flags) = lmap.lm_flags;
|
||||
SCARG(&nlmap,fd) = lmap.lm_fd;
|
||||
SCARG(&nlmap,offset) = (unsigned)lmap.lm_pos;
|
||||
DPRINTF(("old_mmap(%p, %d, %d, %d, %d, %d)\n",
|
||||
SCARG(&nlmap,offset) = lmap.lm_offset;
|
||||
DPRINTF(("old_mmap(%p, %u, %u, %u, %d, %u)\n",
|
||||
lmap.lm_addr, lmap.lm_len, lmap.lm_prot, lmap.lm_flags,
|
||||
lmap.lm_fd, lmap.lm_pos));
|
||||
lmap.lm_fd, lmap.lm_offset));
|
||||
return linux_sys_mmap(l, &nlmap, retval);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_oldmmap.h,v 1.2 1998/10/07 23:06:17 erh Exp $ */
|
||||
/* $NetBSD: linux_oldmmap.h,v 1.3 2004/08/22 15:40:41 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -51,12 +51,12 @@
|
|||
* Passed to the mmap() system call
|
||||
*/
|
||||
struct linux_oldmmap {
|
||||
caddr_t lm_addr;
|
||||
int lm_len;
|
||||
int lm_prot;
|
||||
int lm_flags;
|
||||
unsigned int lm_addr;
|
||||
unsigned int lm_len;
|
||||
unsigned int lm_prot;
|
||||
unsigned int lm_flags;
|
||||
int lm_fd;
|
||||
int lm_pos;
|
||||
unsigned int lm_offset;
|
||||
};
|
||||
|
||||
#endif /* !_MULTIARCH_LINUX_OLDMMAP_H */
|
||||
|
|
Loading…
Reference in New Issue