aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew N. Dodd <mdodd@FreeBSD.org>2003-03-25 20:02:55 +0000
committerMatthew N. Dodd <mdodd@FreeBSD.org>2003-03-25 20:02:55 +0000
commit91d631e536937ecaef5b6fb26a333d65095be5e3 (patch)
tree46167cf95a505e77d7c1a08a6526dd0785ac93db
parente7561407e2508f6a533012e410343b6142a839f1 (diff)
Notes
-rw-r--r--sys/i386/linux/linux_machdep.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c
index c7e6531de9aee..c1aaa76ffc65a 100644
--- a/sys/i386/linux/linux_machdep.c
+++ b/sys/i386/linux/linux_machdep.c
@@ -442,7 +442,9 @@ linux_mmap_common(struct thread *td, struct l_mmap_argv *linux_args)
long pad;
off_t pos;
} */ bsd_args;
+ int error;
+ error = 0;
bsd_args.flags = 0;
if (linux_args->flags & LINUX_MAP_SHARED)
bsd_args.flags |= MAP_SHARED;
@@ -530,12 +532,18 @@ linux_mmap_common(struct thread *td, struct l_mmap_argv *linux_args)
#ifdef DEBUG
if (ldebug(mmap))
- printf("-> (%p, %d, %d, 0x%08x, %d, %d)\n",
+ printf("-> %s(%p, %d, %d, 0x%08x, %d, 0x%x)\n",
+ __func__,
(void *)bsd_args.addr, bsd_args.len, bsd_args.prot,
bsd_args.flags, bsd_args.fd, (int)bsd_args.pos);
#endif
-
- return (mmap(td, &bsd_args));
+ error = mmap(td, &bsd_args);
+#ifdef DEBUG
+ if (ldebug(mmap))
+ printf("-> %s() return: 0x%x (0x%08x)\n",
+ __func__, error, (u_int)td->td_retval[0]);
+#endif
+ return (error);
}
int