]> git.pld-linux.org Git - packages/open-vm-tools.git/blob - open-vm-tools-linux-3.15.patch
- fix building with linux 3.10.76
[packages/open-vm-tools.git] / open-vm-tools-linux-3.15.patch
1 --- a/modules/linux/vmhgfs/link.c.orig  2014-04-23 10:11:34.891106441 +0100
2 +++ a/modules/linux/vmhgfs/link.c       2014-04-23 00:49:03.000000000 +0100
3 @@ -148,7 +148,7 @@
4   *
5   *----------------------------------------------------------------------
6   */
7 -
8 +#if LINUX_VERSION_CODE <= KERNEL_VERSION(3, 14, 99)
9  static int
10  HgfsReadlink(struct dentry *dentry,  // IN:  Dentry containing link
11               char __user *buffer,    // OUT: User buffer to copy link into
12 @@ -186,3 +186,42 @@
13     }
14     return error;
15  }
16 +#else
17 +static int
18 +HgfsReadlink(struct dentry *dentry,  // IN:  Dentry containing link
19 +             char __user *buffer,    // OUT: User buffer to copy link into
20 +             int buflen)             // IN:  Length of user buffer
21 +
22 +{
23 +   HgfsAttrInfo attr;
24 +   char *fileName = NULL;
25 +   int error;
26 +
27 +   ASSERT(dentry);
28 +   ASSERT(buffer);
29 +
30 +   if (!dentry) {
31 +      LOG(4, (KERN_DEBUG "VMware hgfs: HgfsReadlink: null input\n"));
32 +      return -EINVAL;
33 +   }
34 +
35 +   LOG(6, (KERN_DEBUG "VMware hgfs: HgfsReadlink: calling "
36 +           "HgfsPrivateGetattr\n"));
37 +   error = HgfsPrivateGetattr(dentry, &attr, &fileName);
38 +   if (!error) {
39 +
40 +      /* Let's make sure we got called on a symlink. */
41 +      if (attr.type != HGFS_FILE_TYPE_SYMLINK || fileName == NULL) {
42 +         LOG(6, (KERN_DEBUG "VMware hgfs: HgfsReadlink: got called "
43 +                 "on something that wasn't a symlink\n"));
44 +         error = -EINVAL;
45 +      } else {
46 +         LOG(6, (KERN_DEBUG "VMware hgfs: HgfsReadlink: calling "
47 +                 "readlink_copy\n"));
48 +         error = readlink_copy(buffer, buflen, fileName);
49 +      }
50 +      kfree(fileName);
51 +   }
52 +   return error;
53 +}
54 +#endif
55 --- open-vm-tools-9.4.0-1280544/modules/linux/vmblock/linux/inode.c~    2014-07-12 12:00:49.000000000 +0200
56 +++ open-vm-tools-9.4.0-1280544/modules/linux/vmblock/linux/inode.c     2014-07-12 12:36:59.427802346 +0200
57 @@ -191,7 +191,11 @@
58        return -EINVAL;
59     }
60  
61 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0)
62     return vfs_readlink(dentry, buffer, buflen, iinfo->name);
63 +#else
64 +   return readlink_copy(buffer, buflen, iinfo->name);
65 +#endif
66  }
67  
68  
69 --- open-vm-tools-9.4.0-1280544/modules/linux/vsock/linux/notify.c      2014-04-14 23:36:15.779380482 +0200
70 +++ open-vm-tools-9.4.0-1280544/modules/linux/vsock/linux/notify.c.new  2014-04-14 23:36:41.396381914 +0200
71 @@ -516,7 +516,11 @@
72     PKT_FIELD(vsk, sentWaitingRead) = FALSE;
73  #endif
74  
75 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0)
76     sk->sk_data_ready(sk, 0);
77 +#else
78 +   sk->sk_data_ready(sk);
79 +#endif
80  }
81  
82  
83 --- open-vm-tools-9.4.0-1280544/modules/linux/vsock/linux/notifyQState.c        2013-10-18 19:56:12.000000000 +0200
84 +++ open-vm-tools-9.4.0-1280544/modules/linux/vsock/linux/notifyQState.c.new    2014-04-14 23:37:53.316385936 +0200
85 @@ -164,7 +164,11 @@
86                       struct sockaddr_vm *dst,    // IN: unused
87                       struct sockaddr_vm *src)    // IN: unused
88  {
89 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0)
90     sk->sk_data_ready(sk, 0);
91 +#else
92 +   sk->sk_data_ready(sk);
93 +#endif
94  }
95  
96  
97 @@ -566,7 +570,12 @@
98        }
99  
100        /* See the comment in VSockVmciNotifyPktSendPostEnqueue */
101 +
102 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0)
103        sk->sk_data_ready(sk, 0);
104 +#else
105 +      sk->sk_data_ready(sk);
106 +#endif
107     }
108  
109     return err;
This page took 0.13362 seconds and 3 git commands to generate.