From 5be2b1a1e93bcd8e6494fbe9c9c0d88c90b31510 Mon Sep 17 00:00:00 2001 From: mdodd Date: Tue, 25 Mar 2003 20:02:55 +0000 Subject: Print the return value from mmap() in the DEBUG case. --- sys/i386/linux/linux_machdep.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'sys/i386/linux') 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 -- cgit v1.1