diff options
Diffstat (limited to 'arch/um/kernel/syscall.c')
| -rw-r--r-- | arch/um/kernel/syscall.c | 48 |
1 files changed, 20 insertions, 28 deletions
diff --git a/arch/um/kernel/syscall.c b/arch/um/kernel/syscall.c index 1429c131879..c1d0ae069b5 100644 --- a/arch/um/kernel/syscall.c +++ b/arch/um/kernel/syscall.c @@ -1,36 +1,28 @@ /* - * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) + * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Licensed under the GPL */ -#include "kern_util.h" -#include "syscall.h" -#include "os.h" +#include <linux/file.h> +#include <linux/fs.h> +#include <linux/mm.h> +#include <linux/sched.h> +#include <linux/utsname.h> +#include <linux/syscalls.h> +#include <asm/current.h> +#include <asm/mman.h> +#include <asm/uaccess.h> +#include <asm/unistd.h> -struct { - int syscall; - int pid; - long result; - unsigned long long start; - unsigned long long end; -} syscall_record[1024]; - -int record_syscall_start(int syscall) +long old_mmap(unsigned long addr, unsigned long len, + unsigned long prot, unsigned long flags, + unsigned long fd, unsigned long offset) { - int max, index; - - max = sizeof(syscall_record)/sizeof(syscall_record[0]); - index = next_syscall_index(max); + long err = -EINVAL; + if (offset & ~PAGE_MASK) + goto out; - syscall_record[index].syscall = syscall; - syscall_record[index].pid = current_pid(); - syscall_record[index].result = 0xdeadbeef; - syscall_record[index].start = os_usecs(); - return(index); -} - -void record_syscall_end(int index, long result) -{ - syscall_record[index].result = result; - syscall_record[index].end = os_usecs(); + err = sys_mmap_pgoff(addr, len, prot, flags, fd, offset >> PAGE_SHIFT); + out: + return err; } |
