lkml.org 
[lkml]   [2003]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: ioctl32 consolidation -- call for testing
On Thu, Feb 27, 2003 at 12:13:02PM -0800, David S. Miller wrote:
> From: Ben Collins <bcollins@debian.org>
> Date: Thu, 27 Feb 2003 15:27:39 -0500
>
> Here it is. Sparc64's macros for ioctl32's assumed that cmd was u_int
> instead of u_long. This look ok to you, Dave?
>
> We would love to see that patch :-)

It was real small...so small that it slipped through mutt's open() call
and never got attached :)



--
Debian - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
Deqo - http://www.deqo.com/
--- arch/sparc64/kernel/ioctl32.c~ 2003-02-27 14:54:49.000000000 -0500
+++ arch/sparc64/kernel/ioctl32.c 2003-02-27 15:19:29.000000000 -0500
@@ -11,6 +11,7 @@
#include <linux/config.h>
#include <linux/types.h>
#include <linux/compat.h>
+#include <linux/ioctl32.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/smp.h>
@@ -4274,10 +4275,14 @@
#define BNEPGETCONNLIST _IOR('B', 210, int)
#define BNEPGETCONNINFO _IOR('B', 211, int)

-#define COMPATIBLE_IOCTL(cmd) asm volatile(".word %0, sys_ioctl, 0" : : "i" (cmd));
-#define HANDLE_IOCTL(cmd,handler) asm volatile(".word %0, %1, 0" : : "i" (cmd), "i" (handler));
-#define IOCTL_TABLE_START void ioctl32_foo(void) { asm volatile(".data\n.global ioctl_start\nioctl_start:");
-#define IOCTL_TABLE_END asm volatile("\n.global ioctl_end\nioctl_end:\n\t.previous"); }
+typedef int (* ioctl32_handler_t)(unsigned int, unsigned int, unsigned long, struct file *);
+
+#define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL((cmd),sys_ioctl)
+#define HANDLE_IOCTL(cmd,handler) { (cmd), (ioctl32_handler_t)(handler), NULL },
+#define IOCTL_TABLE_START \
+ struct ioctl_trans ioctl_start[] = {
+#define IOCTL_TABLE_END \
+ }; struct ioctl_trans ioctl_end[0];

IOCTL_TABLE_START
/* List here exlicitly which ioctl's are known to have
\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.108 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site