From: Aivils S. <ai...@us...> - 2004-10-22 07:46:26
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/fs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1411/ruby-2.6/fs Modified Files: compat_ioctl.c Log Message: sync to 2.6.9 Index: compat_ioctl.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/fs/compat_ioctl.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- compat_ioctl.c 24 Aug 2004 05:31:55 -0000 1.12 +++ compat_ioctl.c 22 Oct 2004 07:46:17 -0000 1.13 @@ -15,6 +15,7 @@ #include <linux/types.h> #include <linux/compat.h> #include <linux/kernel.h> +#include <linux/compiler.h> #include <linux/sched.h> #include <linux/smp.h> #include <linux/smp_lock.h> @@ -115,6 +116,8 @@ #include <linux/filter.h> #include <linux/msdos_fs.h> +#include <linux/hiddev.h> + #undef INCLUDES #endif @@ -407,6 +410,7 @@ return err; } +#ifdef CONFIG_NET static int do_siocgstamp(unsigned int fd, unsigned int cmd, unsigned long arg) { struct compat_timeval __user *up = compat_ptr(arg); @@ -461,7 +465,6 @@ compat_caddr_t ifcbuf; }; -#ifdef CONFIG_NET static int dev_ifname32(unsigned int fd, unsigned int cmd, unsigned long arg) { struct net_device *dev; @@ -481,7 +484,6 @@ err = copy_to_user(compat_ptr(arg), &ifr32, sizeof(ifr32)); return (err ? -EFAULT : 0); } -#endif static int dev_ifconf(unsigned int fd, unsigned int cmd, unsigned long arg) { @@ -797,6 +799,7 @@ return ret; } +#endif struct hd_geometry32 { unsigned char heads; @@ -1595,12 +1598,7 @@ perm = vt_check(file); if (perm < 0) return perm; - - if (copy_from_user(&cfdarg, user_cfd, sizeof(struct consolefontdesc32))) - return -EFAULT; - - cfdarg.chardata = compat_ptr(((struct consolefontdesc32 *)&cfdarg)->chardata); - + switch (cmd) { case PIO_FONTX: if (!perm) @@ -1883,7 +1881,8 @@ return -EINVAL; } -static int ret_einval(unsigned int fd, unsigned int cmd, unsigned long arg) +static __attribute_used__ int +ret_einval(unsigned int fd, unsigned int cmd, unsigned long arg) { return -EINVAL; } @@ -3173,7 +3172,6 @@ HANDLE_IOCTL(MEMWRITEOOB32, mtd_rw_oob) #ifdef CONFIG_NET HANDLE_IOCTL(SIOCGIFNAME, dev_ifname32) -#endif HANDLE_IOCTL(SIOCGIFCONF, dev_ifconf) HANDLE_IOCTL(SIOCGIFFLAGS, dev_ifsioc) HANDLE_IOCTL(SIOCSIFFLAGS, dev_ifsioc) @@ -3217,6 +3215,7 @@ /* Note SIOCRTMSG is no longer, so this is safe and * the user would have seen just an -EINVAL anyways. */ HANDLE_IOCTL(SIOCRTMSG, ret_einval) HANDLE_IOCTL(SIOCGSTAMP, do_siocgstamp) +#endif HANDLE_IOCTL(HDIO_GETGEO, hdio_getgeo) HANDLE_IOCTL(BLKRAGET, w_long) HANDLE_IOCTL(BLKGETSIZE, w_long) |