~ubuntu-branches/ubuntu/quantal/open-vm-tools/quantal-201210021442

« back to all changes in this revision

Viewing changes to modules/linux/shared/compat_mm.h

  • Committer: Bazaar Package Importer
  • Author(s): Serge Hallyn
  • Date: 2011-03-31 14:20:05 UTC
  • mfrom: (1.4.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110331142005-3n9red91p7ogkweo
Tags: 2011.03.28-387002-0ubuntu1
* Merge latest upstream git tag.  This has the unlocked_ioctl change
  needed to fix dkms build failures (LP: #727342)
* Changes in debian/rules:
  - work around a bug in toolbox/Makefile, where install-exec-hook is
    not happening.  This needs to get fixed the right way.
  - don't install 'vmware-user' which seems to no longer exist
  - move /etc/xdg into open-vm-toolbox (which should be done using .install)
* debian/open-vm-tools.init: add 'modprobe [-r] vmblock'. (LP: #332323)
* debian/rules and debian/open-vm-toolbox.lintian-overrides:
  - Make vmware-user-suid-wrapper suid-root (LP: #332323)

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
#endif
49
49
 
50
50
 
51
 
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 0)
52
 
#  define compat_vm_pgoff(vma) ((vma)->vm_offset >> PAGE_SHIFT)
53
 
 
54
 
static inline unsigned long compat_do_mmap_pgoff(struct file *file, unsigned long addr,
55
 
   unsigned long len, unsigned long prot,
56
 
   unsigned long flag, unsigned long pgoff)
57
 
{
58
 
   unsigned long ret = -EINVAL;
59
 
 
60
 
   if (pgoff < 1 << (32 - PAGE_SHIFT)) {
61
 
      ret = do_mmap(file, addr, len, prot, flag, pgoff << PAGE_SHIFT);
62
 
   }
63
 
   return ret;
64
 
}
65
 
 
66
 
#else
67
 
#  define compat_vm_pgoff(vma) (vma)->vm_pgoff
68
 
#  ifdef VMW_SKAS_MMAP
69
 
#    define compat_do_mmap_pgoff(f, a, l, p, g, o) \
70
 
                                do_mmap_pgoff(current->mm, f, a, l, p, g, o)
71
 
#  else
72
 
#    define compat_do_mmap_pgoff(f, a, l, p, g, o) \
73
 
                                do_mmap_pgoff(f, a, l, p, g, o)
74
 
#  endif
75
 
#endif
76
 
 
77
 
 
78
51
/* 2.2.x uses 0 instead of some define */
79
52
#ifndef NOPAGE_SIGBUS
80
53
#define NOPAGE_SIGBUS (0)