Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Kernel v2.4.13-ac8 /fs/ioctl.c

Filename:/fs/ioctl.c
Lines Added:10
Lines Deleted:0
Also changed in: (Previous) 2.4.13-ac7  2.4.13-ac6  2.4.13-ac5  2.4.13-ac4  2.4.13-ac3  2.4.13-ac1 
(Following) 2.4.18-pre3-ac1  2.4.18-pre3-ac2  2.4.18-pre7-ac1  2.4.18-pre7-ac2  2.4.18-pre7-ac3  2.4.18-pre9-ac1 

Location
[  2.4.13-ac8
  [  fs
     o  ioctl.c

Patch

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/ioctl.c linux.ac/fs/ioctl.c
--- linux.vanilla/fs/ioctl.c   Fri Feb  9 19:29:44 2001
+++ linux.ac/fs/ioctl.c   Wed Oct 10 01:48:22 2001
@@ -101,6 +101,16 @@
             filp->f_flags &= ~FASYNC;
          break;
 
+      case FIOQSIZE:
+         if (S_ISDIR(filp->f_dentry->d_inode->i_mode) ||
+             S_ISREG(filp->f_dentry->d_inode->i_mode) ||
+             S_ISLNK(filp->f_dentry->d_inode->i_mode)) {
+            loff_t res = inode_get_bytes(filp->f_dentry->d_inode);
+            error = copy_to_user((loff_t *)arg, &res, sizeof(res)) ? -EFAULT : 0;
+         }
+         else
+            error = -ENOTTY;
+         break;
       default:
          error = -ENOTTY;
          if (S_ISREG(filp->f_dentry->d_inode->i_mode))


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.