summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Teran <evan.teran@gmail.com>2014-10-09 17:16:53 -0400
committerEvan Teran <evan.teran@gmail.com>2014-10-09 17:16:53 -0400
commitafba145791293bf201c88e3e4c4b0dad9ec3ac54 (patch)
tree47cd5fd772e7e72cc5c6eb6938fdb1df89ecbcc2 /app-emulation/vmware-modules
parentnow properly compiles with minimal wanrings for 3.10, moving onto 3.11 testin... (diff)
downloadvmware-afba145791293bf201c88e3e4c4b0dad9ec3ac54.tar.gz
vmware-afba145791293bf201c88e3e4c4b0dad9ec3ac54.tar.bz2
vmware-afba145791293bf201c88e3e4c4b0dad9ec3ac54.zip
compiles cleanly with 3.11, moving onto 3.12
Diffstat (limited to 'app-emulation/vmware-modules')
-rw-r--r--app-emulation/vmware-modules/files/271-3.11-00-readdir.patch38
-rw-r--r--app-emulation/vmware-modules/files/271-3.11-01-filldir.patch50
-rw-r--r--app-emulation/vmware-modules/vmware-modules-271.3-r1.ebuild21
3 files changed, 105 insertions, 4 deletions
diff --git a/app-emulation/vmware-modules/files/271-3.11-00-readdir.patch b/app-emulation/vmware-modules/files/271-3.11-00-readdir.patch
new file mode 100644
index 0000000..15a9a8f
--- /dev/null
+++ b/app-emulation/vmware-modules/files/271-3.11-00-readdir.patch
@@ -0,0 +1,38 @@
+diff -Naur vmblock-only/linux/file.c vmblock-only/linux/file.c
+--- vmblock-only/linux/file.c 2013-11-05 23:33:26.000000000 -0500
++++ vmblock-only/linux/file.c 2014-04-26 10:58:03.062635343 -0400
+@@ -166,11 +166,9 @@
+
+ static int
+ FileOpReaddir(struct file *file, // IN
+- void *dirent, // IN
+- filldir_t filldir) // IN
++ struct dir_context *ctx)
+ {
+ int ret;
+- FilldirInfo info;
+ struct file *actualFile;
+
+ if (!file) {
+@@ -184,11 +182,8 @@
+ return -EINVAL;
+ }
+
+- info.filldir = filldir;
+- info.dirent = dirent;
+-
+ actualFile->f_pos = file->f_pos;
+- ret = vfs_readdir(actualFile, Filldir, &info);
++ ret = iterate_dir(actualFile, ctx);
+ file->f_pos = actualFile->f_pos;
+
+ return ret;
+@@ -237,7 +232,7 @@
+
+
+ struct file_operations RootFileOps = {
+- .readdir = FileOpReaddir,
++ .iterate = FileOpReaddir,
+ .open = FileOpOpen,
+ .release = FileOpRelease,
+ };
diff --git a/app-emulation/vmware-modules/files/271-3.11-01-filldir.patch b/app-emulation/vmware-modules/files/271-3.11-01-filldir.patch
new file mode 100644
index 0000000..d36c61a
--- /dev/null
+++ b/app-emulation/vmware-modules/files/271-3.11-01-filldir.patch
@@ -0,0 +1,50 @@
+diff -rupN vmblock-only/linux/file.c vmblock-only.new/linux/file.c
+--- vmblock-only/linux/file.c 2014-10-07 23:22:46.832469618 -0400
++++ vmblock-only.new/linux/file.c 2014-10-07 23:24:35.276472720 -0400
+@@ -38,46 +38,6 @@ typedef u64 inode_num_t;
+ typedef ino_t inode_num_t;
+ #endif
+
+-/* Specifically for our filldir_t callback */
+-typedef struct FilldirInfo {
+- filldir_t filldir;
+- void *dirent;
+-} FilldirInfo;
+-
+-
+-/*
+- *----------------------------------------------------------------------------
+- *
+- * Filldir --
+- *
+- * Callback function for readdir that we use in place of the one provided.
+- * This allows us to specify that each dentry is a symlink, but pass through
+- * everything else to the original filldir function.
+- *
+- * Results:
+- * Original filldir's return value.
+- *
+- * Side effects:
+- * Directory information gets copied to user's buffer.
+- *
+- *----------------------------------------------------------------------------
+- */
+-
+-static int
+-Filldir(void *buf, // IN: Dirent buffer passed from FileOpReaddir
+- const char *name, // IN: Dirent name
+- int namelen, // IN: len of dirent's name
+- loff_t offset, // IN: Offset
+- inode_num_t ino, // IN: Inode number of dirent
+- unsigned int d_type) // IN: Type of file
+-{
+- FilldirInfo *info = buf;
+-
+- /* Specify DT_LNK regardless */
+- return info->filldir(info->dirent, name, namelen, offset, ino, DT_LNK);
+-}
+-
+-
+ /* File operations */
+
+ /*
diff --git a/app-emulation/vmware-modules/vmware-modules-271.3-r1.ebuild b/app-emulation/vmware-modules/vmware-modules-271.3-r1.ebuild
index 72b49b0..7b2771a 100644
--- a/app-emulation/vmware-modules/vmware-modules-271.3-r1.ebuild
+++ b/app-emulation/vmware-modules/vmware-modules-271.3-r1.ebuild
@@ -66,10 +66,23 @@ src_prepare() {
epatch "${FILESDIR}/${PV_MAJOR}-apic.patch"
kernel_is ge 3 7 0 && epatch "${FILESDIR}/${PV_MAJOR}-putname.patch"
- kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-271-3.10-00-userns.patch
- kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-271-3.10-01-create_proc_entry.patch
- kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-271-3.10-02-getname.patch
- kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-271-3.10-03-deprecated.patch
+ kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.10-00-userns.patch"
+ kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.10-01-create_proc_entry.patch"
+ kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.10-02-getname.patch"
+ kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.10-03-deprecated.patch"
+ kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.10-04-unused-typedef.patch"
+ kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.10-05-dentry.patch"
+ kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.10-06-inode.patch"
+
+ # fixes a memcpy/memcmp bug in the hub code
+ kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.10-07-hub.patch"
+
+ kernel_is ge 3 11 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.11-00-readdir.patch"
+ kernel_is ge 3 11 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.11-01-filldir.patch"
+
+
+
+
# Allow user patches so they can support RC kernels and whatever else
epatch_user