Commit | Line | Data |
---|---|---|
1d3468a6 | 1 | /* |
ba180fd4 | 2 | * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) |
1da177e4 LT |
3 | * Licensed under the GPL |
4 | */ | |
5 | ||
37185b33 AV |
6 | #include <linux/file.h> |
7 | #include <linux/fs.h> | |
8 | #include <linux/mm.h> | |
9 | #include <linux/sched.h> | |
10 | #include <linux/utsname.h> | |
11 | #include <linux/syscalls.h> | |
12 | #include <asm/current.h> | |
13 | #include <asm/mman.h> | |
14 | #include <asm/uaccess.h> | |
15 | #include <asm/unistd.h> | |
1da177e4 | 16 | |
1da177e4 LT |
17 | long old_mmap(unsigned long addr, unsigned long len, |
18 | unsigned long prot, unsigned long flags, | |
19 | unsigned long fd, unsigned long offset) | |
20 | { | |
21 | long err = -EINVAL; | |
22 | if (offset & ~PAGE_MASK) | |
23 | goto out; | |
24 | ||
f8b72560 | 25 | err = sys_mmap_pgoff(addr, len, prot, flags, fd, offset >> PAGE_SHIFT); |
1da177e4 LT |
26 | out: |
27 | return err; | |
28 | } |