Commit 1a19232d authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] add linux/ioctl32.h header for 2.5.43

Several ports (x86-64,ppc64,sparc64) which do 32bit ioctl emulation
have functions for drivers to let them define their own translation
handlers. So far it was a bit complicated to use because there
was no standard include file that declares the prototypes for this
stuff. Then drivers and other subsystems can start to declare their own
ioctl translation handlers.

This patch add include/linux/ioctl32.h to fix this.

The actual implementation is in arch specific code. It has been coordinated
with DaveM and Anton.

This patch is needed for the x86-64 merge I sent in separate mail.

There is currently no preprocessor symbol that the drivers can test
to see if they should use this. So far they have to check arch symbols.
This will be fixed later when all 64bit ports that need it add the dynamic
ioctl registration API too (that's ia64,s390x,mips64)
parent 3428c8d1
#ifndef IOCTL32_H
#define IOCTL32_H 1
struct file;
int sys_ioctl(unsigned int, unsigned int, unsigned long);
/*
* Register an 32bit ioctl translation handler for ioctl cmd.
*
* handler == NULL: use 64bit ioctl handler.
* arguments to handler: fd: file descriptor
* cmd: ioctl command.
* arg: ioctl argument
* struct file *file: file descriptor pointer.
*/
extern int register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned int, unsigned int, unsigned long, struct file *));
extern int unregister_ioctl32_conversion(unsigned int cmd);
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment