commit: afba145791293bf201c88e3e4c4b0dad9ec3ac54
Author: Evan Teran <evan.teran <AT> gmail <DOT> com>
AuthorDate: Thu Oct 9 21:16:53 2014 +0000
Commit: Evan Teran <evan.teran <AT> gmail <DOT> com>
CommitDate: Thu Oct 9 21:16:53 2014 +0000
URL:
http://sources.gentoo.org/gitweb/?p=proj/vmware.git;a=commit;h=afba1457
compiles cleanly with 3.11, moving onto 3.12
---
.../vmware-modules/files/271-3.11-00-readdir.patch | 38 ++++++++++++++++
.../vmware-modules/files/271-3.11-01-filldir.patch | 50 ++++++++++++++++++++++
.../vmware-modules/vmware-modules-271.3-r1.ebuild | 21 +++++++--
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