summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'openvz-sources/022.050/5008_diff-ms-ioctl32-compat-20051026.patch')
-rw-r--r--openvz-sources/022.050/5008_diff-ms-ioctl32-compat-20051026.patch78
1 files changed, 78 insertions, 0 deletions
diff --git a/openvz-sources/022.050/5008_diff-ms-ioctl32-compat-20051026.patch b/openvz-sources/022.050/5008_diff-ms-ioctl32-compat-20051026.patch
new file mode 100644
index 0000000..cc303ac
--- /dev/null
+++ b/openvz-sources/022.050/5008_diff-ms-ioctl32-compat-20051026.patch
@@ -0,0 +1,78 @@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+# 2004/08/27 10:32:29-07:00 akpm@osdl.org
+# [PATCH] [un]register_ioctl32_conversion() stubs
+#
+# The megaraid driver is calling these, but they don't exist if !CONFIG_COMPAT.
+# Add the necessary stubs, and clean a few things up.
+#
+# Signed-off-by: Andrew Morton <akpm@osdl.org>
+# Signed-off-by: Linus Torvalds <torvalds@osdl.org>
+#
+# fs/compat.c
+# 2004/08/27 00:26:26-07:00 akpm@osdl.org +2 -2
+# [un]register_ioctl32_conversion() stubs
+#
+# include/linux/ioctl32.h
+# 2004/08/26 23:30:32-07:00 akpm@osdl.org +17 -8
+# [un]register_ioctl32_conversion() stubs
+#
+diff -Naru a/fs/compat.c b/fs/compat.c
+--- a/fs/compat.c 2005-10-26 01:53:18 -07:00
++++ b/fs/compat.c 2005-10-26 01:53:18 -07:00
+@@ -291,8 +291,8 @@
+
+ __initcall(init_sys32_ioctl);
+
+-int register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned int,
+- unsigned int, unsigned long, struct file *))
++int register_ioctl32_conversion(unsigned int cmd,
++ ioctl_trans_handler_t handler)
+ {
+ struct ioctl_trans *t;
+ struct ioctl_trans *new_t;
+diff -Naru a/include/linux/ioctl32.h b/include/linux/ioctl32.h
+--- a/include/linux/ioctl32.h 2005-10-26 01:53:18 -07:00
++++ b/include/linux/ioctl32.h 2005-10-26 01:53:18 -07:00
+@@ -3,6 +3,15 @@
+
+ struct file;
+
++typedef int (*ioctl_trans_handler_t)(unsigned int, unsigned int,
++ unsigned long, struct file *);
++
++struct ioctl_trans {
++ unsigned long cmd;
++ ioctl_trans_handler_t handler;
++ struct ioctl_trans *next;
++};
++
+ /*
+ * Register an 32bit ioctl translation handler for ioctl cmd.
+ *
+@@ -13,16 +22,16 @@
+ * struct file *file: file descriptor pointer.
+ */
+
+-extern int register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned int, unsigned int, unsigned long, struct file *));
+-
++#ifdef CONFIG_COMPAT
++extern int register_ioctl32_conversion(unsigned int cmd,
++ ioctl_trans_handler_t handler);
+ extern int unregister_ioctl32_conversion(unsigned int cmd);
+
+-typedef int (*ioctl_trans_handler_t)(unsigned int, unsigned int, unsigned long, struct file *);
++#else
+
+-struct ioctl_trans {
+- unsigned long cmd;
+- ioctl_trans_handler_t handler;
+- struct ioctl_trans *next;
+-};
++#define register_ioctl32_conversion(cmd, handler) ({ 0; })
++#define unregister_ioctl32_conversion(cmd) ({ 0; })
++
++#endif
+
+ #endif