Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/linux/common make struct linux_oldmmap members ex...
details: https://anonhg.NetBSD.org/src/rev/c1f2453507c9
branches: trunk
changeset: 569497:c1f2453507c9
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Sun Aug 22 15:40:41 2004 +0000
description:
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
diffstat:
sys/compat/linux/common/linux_oldmmap.c | 14 +++++++-------
sys/compat/linux/common/linux_oldmmap.h | 12 ++++++------
2 files changed, 13 insertions(+), 13 deletions(-)
diffs (69 lines):
diff -r 0f5dcfc5f5dd -r c1f2453507c9 sys/compat/linux/common/linux_oldmmap.c
--- a/sys/compat/linux/common/linux_oldmmap.c Sun Aug 22 13:29:40 2004 +0000
+++ b/sys/compat/linux/common/linux_oldmmap.c Sun Aug 22 15:40:41 2004 +0000
@@ -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 @@
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);
}
diff -r 0f5dcfc5f5dd -r c1f2453507c9 sys/compat/linux/common/linux_oldmmap.h
--- a/sys/compat/linux/common/linux_oldmmap.h Sun Aug 22 13:29:40 2004 +0000
+++ b/sys/compat/linux/common/linux_oldmmap.h Sun Aug 22 15:40:41 2004 +0000
@@ -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 */
Home |
Main Index |
Thread Index |
Old Index