summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormdodd <mdodd@FreeBSD.org>2003-03-25 20:02:55 +0000
committermdodd <mdodd@FreeBSD.org>2003-03-25 20:02:55 +0000
commit5be2b1a1e93bcd8e6494fbe9c9c0d88c90b31510 (patch)
tree46167cf95a505e77d7c1a08a6526dd0785ac93db
parent81073fb53b84ad9c847591600f8feee374719564 (diff)
downloadFreeBSD-src-5be2b1a1e93bcd8e6494fbe9c9c0d88c90b31510.zip
FreeBSD-src-5be2b1a1e93bcd8e6494fbe9c9c0d88c90b31510.tar.gz
Print the return value from mmap() in the DEBUG case.
-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 c7e6531..c1aaa76 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
OpenPOWER on IntegriCloud