Update of /cvsroot/linuxconsole/ruby/ruby-2.6/fs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8321/ruby-2.6/fs
Modified Files:
compat_ioctl.c
Log Message:
sync to 2.6.5
Index: compat_ioctl.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/fs/compat_ioctl.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- compat_ioctl.c 20 Feb 2004 06:52:18 -0000 1.7
+++ compat_ioctl.c 23 Apr 2004 07:36:56 -0000 1.8
@@ -62,6 +62,7 @@
#include <linux/if_tun.h>
#include <linux/ctype.h>
#include <linux/ioctl32.h>
+#include <linux/syscalls.h>
#include <linux/ncp_fs.h>
#include <linux/i2c.h>
#include <linux/i2c-dev.h>
@@ -1457,6 +1458,7 @@
struct cdrom_generic_command *cgc;
struct cdrom_generic_command32 *cgc32;
unsigned char dir;
+ int itmp;
cgc = compat_alloc_user_space(sizeof(*cgc));
cgc32 = compat_ptr(arg);
@@ -1468,12 +1470,16 @@
__cgc_do_ptr((void **) &cgc->sense, &cgc32->sense))
return -EFAULT;
- if (get_user(dir, &cgc->data_direction) ||
- put_user(dir, &cgc32->data_direction))
+ if (get_user(dir, &cgc32->data_direction) ||
+ put_user(dir, &cgc->data_direction))
return -EFAULT;
- if (copy_in_user(&cgc->quiet, &cgc32->quiet,
- 2 * sizeof(int)))
+ if (get_user(itmp, &cgc32->quiet) ||
+ put_user(itmp, &cgc->quiet))
+ return -EFAULT;
+
+ if (get_user(itmp, &cgc32->timeout) ||
+ put_user(itmp, &cgc->timeout))
return -EFAULT;
if (__cgc_do_ptr(&cgc->reserved[0], &cgc32->reserved[0]))
@@ -1950,6 +1956,7 @@
set_fs (KERNEL_DS);
err = sys_ioctl(fd, cmd, (unsigned long)&a);
set_fs (old_fs);
+ break;
default:
return -EINVAL;
}
@@ -1983,13 +1990,18 @@
}
/* Bluetooth ioctls */
-#define HCIUARTSETPROTO _IOW('U', 200, int)
-#define HCIUARTGETPROTO _IOR('U', 201, int)
+#define HCIUARTSETPROTO _IOW('U', 200, int)
+#define HCIUARTGETPROTO _IOR('U', 201, int)
-#define BNEPCONNADD _IOW('B', 200, int)
-#define BNEPCONNDEL _IOW('B', 201, int)
-#define BNEPGETCONNLIST _IOR('B', 210, int)
-#define BNEPGETCONNINFO _IOR('B', 211, int)
+#define BNEPCONNADD _IOW('B', 200, int)
+#define BNEPCONNDEL _IOW('B', 201, int)
+#define BNEPGETCONNLIST _IOR('B', 210, int)
+#define BNEPGETCONNINFO _IOR('B', 211, int)
+
+#define CMTPCONNADD _IOW('C', 200, int)
+#define CMTPCONNDEL _IOW('C', 201, int)
+#define CMTPGETCONNLIST _IOR('C', 210, int)
+#define CMTPGETCONNINFO _IOR('C', 211, int)
struct floppy_struct32 {
compat_uint_t size;
@@ -3062,6 +3074,20 @@
return sys_ioctl(fd, cmd, (unsigned long) iwr);
}
+/* Emulate old style bridge ioctls */
+static int do_bridge_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+ u32 tmp;
+ unsigned long *argbuf = compat_alloc_user_space(3 * sizeof(unsigned long));
+ int i;
+ for (i = 0; i < 3; i++) {
+ if (get_user(tmp, i + ((u32 *)arg)) ||
+ put_user(tmp, i + argbuf))
+ return -EFAULT;
+ }
+ return sys_ioctl(fd, cmd, (unsigned long)argbuf);
+}
+
#undef CODE
#endif
@@ -3241,6 +3267,8 @@
HANDLE_IOCTL(SIOCGIWNICKN, do_wireless_ioctl)
HANDLE_IOCTL(SIOCSIWENCODE, do_wireless_ioctl)
HANDLE_IOCTL(SIOCGIWENCODE, do_wireless_ioctl)
+HANDLE_IOCTL(SIOCSIFBR, do_bridge_ioctl)
+HANDLE_IOCTL(SIOCGIFBR, do_bridge_ioctl)
#undef DECLARES
#endif
|