Commit b19c2cf7 authored by Anton Blanchard's avatar Anton Blanchard

Merge samba.org:/scratch/anton/sfr

into samba.org:/scratch/anton/for-alan
parents 7fc33a1b 76712f91
...@@ -442,13 +442,13 @@ struct ifreq32 { ...@@ -442,13 +442,13 @@ struct ifreq32 {
struct ifmap32 ifru_map; struct ifmap32 ifru_map;
char ifru_slave[IFNAMSIZ]; /* Just fits the size */ char ifru_slave[IFNAMSIZ]; /* Just fits the size */
char ifru_newname[IFNAMSIZ]; char ifru_newname[IFNAMSIZ];
__kernel_caddr_t32 ifru_data; compat_caddr_t ifru_data;
} ifr_ifru; } ifr_ifru;
}; };
struct ifconf32 { struct ifconf32 {
int ifc_len; /* size of buffer */ int ifc_len; /* size of buffer */
__kernel_caddr_t32 ifcbuf; compat_caddr_t ifcbuf;
}; };
#ifdef CONFIG_NET #ifdef CONFIG_NET
...@@ -884,7 +884,7 @@ struct floppy_struct32 { ...@@ -884,7 +884,7 @@ struct floppy_struct32 {
unsigned char rate; unsigned char rate;
unsigned char spec1; unsigned char spec1;
unsigned char fmt_gap; unsigned char fmt_gap;
const __kernel_caddr_t32 name; const compat_caddr_t name;
}; };
struct floppy_drive_params32 { struct floppy_drive_params32 {
...@@ -923,7 +923,7 @@ struct floppy_drive_struct32 { ...@@ -923,7 +923,7 @@ struct floppy_drive_struct32 {
int fd_ref; int fd_ref;
int fd_device; int fd_device;
int last_checked; int last_checked;
__kernel_caddr_t32 dmabuf; compat_caddr_t dmabuf;
int bufblocks; int bufblocks;
}; };
...@@ -1413,7 +1413,7 @@ static int sg_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg) ...@@ -1413,7 +1413,7 @@ static int sg_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
} }
struct ppp_option_data32 { struct ppp_option_data32 {
__kernel_caddr_t32 ptr; compat_caddr_t ptr;
__u32 length; __u32 length;
int transmit; int transmit;
}; };
...@@ -1494,8 +1494,8 @@ struct mtget32 { ...@@ -1494,8 +1494,8 @@ struct mtget32 {
__u32 mt_dsreg; __u32 mt_dsreg;
__u32 mt_gstat; __u32 mt_gstat;
__u32 mt_erreg; __u32 mt_erreg;
__kernel_daddr_t32 mt_fileno; compat_daddr_t mt_fileno;
__kernel_daddr_t32 mt_blkno; compat_daddr_t mt_blkno;
}; };
#define MTIOCGET32 _IOR('m', 2, struct mtget32) #define MTIOCGET32 _IOR('m', 2, struct mtget32)
...@@ -1613,7 +1613,7 @@ static int mt_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg) ...@@ -1613,7 +1613,7 @@ static int mt_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
struct cdrom_read32 { struct cdrom_read32 {
int cdread_lba; int cdread_lba;
__kernel_caddr_t32 cdread_bufaddr; compat_caddr_t cdread_bufaddr;
int cdread_buflen; int cdread_buflen;
}; };
...@@ -1621,16 +1621,16 @@ struct cdrom_read_audio32 { ...@@ -1621,16 +1621,16 @@ struct cdrom_read_audio32 {
union cdrom_addr addr; union cdrom_addr addr;
u_char addr_format; u_char addr_format;
int nframes; int nframes;
__kernel_caddr_t32 buf; compat_caddr_t buf;
}; };
struct cdrom_generic_command32 { struct cdrom_generic_command32 {
unsigned char cmd[CDROM_PACKET_SIZE]; unsigned char cmd[CDROM_PACKET_SIZE];
__kernel_caddr_t32 buffer; compat_caddr_t buffer;
unsigned int buflen; unsigned int buflen;
int stat; int stat;
__kernel_caddr_t32 sense; compat_caddr_t sense;
__kernel_caddr_t32 reserved[3]; compat_caddr_t reserved[3];
}; };
static int cdrom_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg) static int cdrom_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
...@@ -1639,7 +1639,7 @@ static int cdrom_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long ar ...@@ -1639,7 +1639,7 @@ static int cdrom_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long ar
struct cdrom_read cdread; struct cdrom_read cdread;
struct cdrom_read_audio cdreadaudio; struct cdrom_read_audio cdreadaudio;
struct cdrom_generic_command cgc; struct cdrom_generic_command cgc;
__kernel_caddr_t32 addr; compat_caddr_t addr;
char *data = 0; char *data = 0;
void *karg; void *karg;
int err = 0; int err = 0;
...@@ -2062,7 +2062,7 @@ static int do_smb_getmountuid(unsigned int fd, unsigned int cmd, unsigned long a ...@@ -2062,7 +2062,7 @@ static int do_smb_getmountuid(unsigned int fd, unsigned int cmd, unsigned long a
struct ncp_ioctl_request_32 { struct ncp_ioctl_request_32 {
unsigned int function; unsigned int function;
unsigned int size; unsigned int size;
__kernel_caddr_t32 data; compat_caddr_t data;
}; };
struct ncp_fs_info_v2_32 { struct ncp_fs_info_v2_32 {
...@@ -2083,13 +2083,13 @@ struct ncp_objectname_ioctl_32 ...@@ -2083,13 +2083,13 @@ struct ncp_objectname_ioctl_32
{ {
int auth_type; int auth_type;
unsigned int object_name_len; unsigned int object_name_len;
__kernel_caddr_t32 object_name; /* an userspace data, in most cases user name */ compat_caddr_t object_name; /* an userspace data, in most cases user name */
}; };
struct ncp_privatedata_ioctl_32 struct ncp_privatedata_ioctl_32
{ {
unsigned int len; unsigned int len;
__kernel_caddr_t32 data; /* ~1000 for NDS */ compat_caddr_t data; /* ~1000 for NDS */
}; };
#define NCP_IOC_NCPREQUEST_32 _IOR('n', 1, struct ncp_ioctl_request_32) #define NCP_IOC_NCPREQUEST_32 _IOR('n', 1, struct ncp_ioctl_request_32)
...@@ -2362,12 +2362,12 @@ static int do_ncp_setprivatedata(unsigned int fd, unsigned int cmd, unsigned lon ...@@ -2362,12 +2362,12 @@ static int do_ncp_setprivatedata(unsigned int fd, unsigned int cmd, unsigned lon
struct atmif_sioc32 { struct atmif_sioc32 {
int number; int number;
int length; int length;
__kernel_caddr_t32 arg; compat_caddr_t arg;
}; };
struct atm_iobuf32 { struct atm_iobuf32 {
int length; int length;
__kernel_caddr_t32 buffer; compat_caddr_t buffer;
}; };
#define ATM_GETLINKRATE32 _IOW('a', ATMIOC_ITF+1, struct atmif_sioc32) #define ATM_GETLINKRATE32 _IOW('a', ATMIOC_ITF+1, struct atmif_sioc32)
...@@ -2428,7 +2428,7 @@ static int do_atm_iobuf(unsigned int fd, unsigned int cmd, unsigned long arg) ...@@ -2428,7 +2428,7 @@ static int do_atm_iobuf(unsigned int fd, unsigned int cmd, unsigned long arg)
iobuf.length = iobuf32.length; iobuf.length = iobuf32.length;
if (iobuf32.buffer == (__kernel_caddr_t32) NULL || iobuf32.length == 0) { if (iobuf32.buffer == (compat_caddr_t) NULL || iobuf32.length == 0) {
iobuf.buffer = (void*)(unsigned long)iobuf32.buffer; iobuf.buffer = (void*)(unsigned long)iobuf32.buffer;
} else { } else {
iobuf.buffer = kmalloc(iobuf.length, GFP_KERNEL); iobuf.buffer = kmalloc(iobuf.length, GFP_KERNEL);
...@@ -2482,7 +2482,7 @@ static int do_atmif_sioc(unsigned int fd, unsigned int cmd, unsigned long arg) ...@@ -2482,7 +2482,7 @@ static int do_atmif_sioc(unsigned int fd, unsigned int cmd, unsigned long arg)
sioc.number = sioc32.number; sioc.number = sioc32.number;
sioc.length = sioc32.length; sioc.length = sioc32.length;
if (sioc32.arg == (__kernel_caddr_t32) NULL || sioc32.length == 0) { if (sioc32.arg == (compat_caddr_t) NULL || sioc32.length == 0) {
sioc.arg = (void*)(unsigned long)sioc32.arg; sioc.arg = (void*)(unsigned long)sioc32.arg;
} else { } else {
sioc.arg = kmalloc(sioc.length, GFP_KERNEL); sioc.arg = kmalloc(sioc.length, GFP_KERNEL);
......
...@@ -2081,8 +2081,8 @@ struct msqid_ds32 ...@@ -2081,8 +2081,8 @@ struct msqid_ds32
unsigned short msg_cbytes; unsigned short msg_cbytes;
unsigned short msg_qnum; unsigned short msg_qnum;
unsigned short msg_qbytes; unsigned short msg_qbytes;
__kernel_ipc_pid_t32 msg_lspid; compat_ipc_pid_t msg_lspid;
__kernel_ipc_pid_t32 msg_lrpid; compat_ipc_pid_t msg_lrpid;
}; };
struct msqid64_ds32 { struct msqid64_ds32 {
...@@ -2108,8 +2108,8 @@ struct shmid_ds32 { ...@@ -2108,8 +2108,8 @@ struct shmid_ds32 {
compat_time_t shm_atime; compat_time_t shm_atime;
compat_time_t shm_dtime; compat_time_t shm_dtime;
compat_time_t shm_ctime; compat_time_t shm_ctime;
__kernel_ipc_pid_t32 shm_cpid; compat_ipc_pid_t shm_cpid;
__kernel_ipc_pid_t32 shm_lpid; compat_ipc_pid_t shm_lpid;
unsigned short shm_nattch; unsigned short shm_nattch;
unsigned short __unused; unsigned short __unused;
unsigned int __unused2; unsigned int __unused2;
...@@ -2670,7 +2670,7 @@ asmlinkage long sys32_sendfile(u32 out_fd, u32 in_fd, compat_off_t* offset, u32 ...@@ -2670,7 +2670,7 @@ asmlinkage long sys32_sendfile(u32 out_fd, u32 in_fd, compat_off_t* offset, u32
extern asmlinkage ssize_t sys_sendfile64(int out_fd, int in_fd, loff_t *offset, size_t count); extern asmlinkage ssize_t sys_sendfile64(int out_fd, int in_fd, loff_t *offset, size_t count);
asmlinkage int sys32_sendfile64(int out_fd, int in_fd, __kernel_loff_t32 *offset, s32 count) asmlinkage int sys32_sendfile64(int out_fd, int in_fd, compat_loff_t *offset, s32 count)
{ {
mm_segment_t old_fs = get_fs(); mm_segment_t old_fs = get_fs();
int ret; int ret;
......
...@@ -18,7 +18,12 @@ typedef u32 compat_mode_t; ...@@ -18,7 +18,12 @@ typedef u32 compat_mode_t;
typedef u32 compat_ino_t; typedef u32 compat_ino_t;
typedef u32 compat_dev_t; typedef u32 compat_dev_t;
typedef s32 compat_off_t; typedef s32 compat_off_t;
typedef s64 compat_loff_t;
typedef s16 compat_nlink_t; typedef s16 compat_nlink_t;
typedef u16 compat_ipc_pid_t;
typedef s32 compat_daddr_t;
typedef u32 compat_caddr_t;
typedef __kernel_fsid_t compat_fsid_t;
struct compat_timespec { struct compat_timespec {
compat_time_t tv_sec; compat_time_t tv_sec;
......
...@@ -14,11 +14,6 @@ ...@@ -14,11 +14,6 @@
* 2 of the License, or (at your option) any later version. * 2 of the License, or (at your option) any later version.
*/ */
#ifndef __KERNEL_STRICT_NAMES
#include <linux/types.h>
typedef __kernel_fsid_t __kernel_fsid_t32;
#endif
/* Use this to get at 32-bit user passed pointers. */ /* Use this to get at 32-bit user passed pointers. */
/* Things to consider: the low-level assembly stub does /* Things to consider: the low-level assembly stub does
srl x, 0, x for first four arguments, so if you have srl x, 0, x for first four arguments, so if you have
...@@ -44,11 +39,6 @@ typedef __kernel_fsid_t __kernel_fsid_t32; ...@@ -44,11 +39,6 @@ typedef __kernel_fsid_t __kernel_fsid_t32;
}) })
/* These are here to support 32-bit syscalls on a 64-bit kernel. */ /* These are here to support 32-bit syscalls on a 64-bit kernel. */
typedef unsigned short __kernel_ipc_pid_t32;
typedef unsigned int __kernel_umode_t32;
typedef int __kernel_daddr_t32;
typedef unsigned int __kernel_caddr_t32;
typedef int __kernel_loff_t32;
struct statfs32 { struct statfs32 {
int f_type; int f_type;
...@@ -58,7 +48,7 @@ struct statfs32 { ...@@ -58,7 +48,7 @@ struct statfs32 {
int f_bavail; int f_bavail;
int f_files; int f_files;
int f_ffree; int f_ffree;
__kernel_fsid_t32 f_fsid; compat_fsid_t f_fsid;
int f_namelen; /* SunOS ignores this field. */ int f_namelen; /* SunOS ignores this field. */
int f_spare[6]; int f_spare[6];
}; };
......
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