patch-2.4.22 linux-2.4.22/fs/ioctl.c
Next file: linux-2.4.22/fs/jbd/journal.c
Previous file: linux-2.4.22/fs/inode.c
Back to the patch index
Back to the overall index
- Lines: 17
- Date:
2003-08-25 04:44:43.000000000 -0700
- Orig file:
linux-2.4.21/fs/ioctl.c
- Orig date:
2001-02-09 11:29:44.000000000 -0800
diff -urN linux-2.4.21/fs/ioctl.c linux-2.4.22/fs/ioctl.c
@@ -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))
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)