Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on May 22nd, 2012  |  syntax: None  |  size: 1.58 KB  |  views: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. commit a5eec0ef3f3285b0acecbf9cc5bb2a3817b2537a
  2. Author: Lars-Peter Clausen <lars@metafoo.de>
  3. Date:   Sun Nov 20 23:20:17 2011 +0100
  4.  
  5.     stash
  6.  
  7. diff --git a/arch/lm32/include/asm/unistd.h b/arch/lm32/include/asm/unistd.h
  8. index bef2328..bd51295 100644
  9. --- a/arch/lm32/include/asm/unistd.h
  10. +++ b/arch/lm32/include/asm/unistd.h
  11. @@ -8,6 +8,4 @@
  12.  
  13.  #include <asm-generic/unistd.h>
  14.  
  15. -#undef __NR_mmap
  16. -
  17.  #endif /* _ASM_LM32_UNISTD_H */
  18. diff --git a/arch/lm32/kernel/sys_call_table.c b/arch/lm32/kernel/sys_call_table.c
  19. index e3f054e..9e84a06 100644
  20. --- a/arch/lm32/kernel/sys_call_table.c
  21. +++ b/arch/lm32/kernel/sys_call_table.c
  22. @@ -5,7 +5,7 @@
  23.  #include <asm/syscalls.h>
  24.  
  25.  #define sys_vfork sys_ni_syscall
  26. -#define sys_mmap sys_ni_syscall
  27. +/*#define sys_mmap sys_ni_syscall*/
  28.  #define sys_mmap2 sys_mmap_pgoff
  29.  
  30.  #undef __SYSCALL
  31. diff --git a/arch/lm32/kernel/sys_lm32.c b/arch/lm32/kernel/sys_lm32.c
  32. index f1c11ed..5fd1131 100644
  33. --- a/arch/lm32/kernel/sys_lm32.c
  34. +++ b/arch/lm32/kernel/sys_lm32.c
  35. @@ -39,6 +39,15 @@
  36.  #include <asm/uaccess.h>
  37.  #include <asm/unistd.h>
  38.  
  39. +asmlinkage long
  40. +sys_mmap(unsigned long addr, unsigned long len, unsigned long prot,
  41. +       unsigned long flags, unsigned long fd, off_t offset)
  42. +{
  43. +       if (unlikely(offset & ~PAGE_MASK))
  44. +               return -EINVAL;
  45. +       return sys_mmap_pgoff(addr, len, prot, flags, fd, offset >> PAGE_SHIFT);
  46. +}
  47. +
  48.  asmlinkage int lm32_execve(const char __user *ufilename,
  49.                             const char __user *const __user *uargv,
  50.                             const char __user *const __user *uenvp,