patch-2.1.71 linux/fs/fat/file.c

Next file: linux/fs/isofs/namei.c
Previous file: linux/fs/coda/sysctl.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.70/linux/fs/fat/file.c linux/fs/fat/file.c
@@ -155,7 +155,7 @@
 /*
 	Read a file into user space
 */
-ssize_t fat_file_read(
+static ssize_t fat_file_read_text(
 	struct file *filp,
 	char *buf,
 	size_t count,
@@ -270,6 +270,17 @@
 	return buf-start;
 }
 
+ssize_t fat_file_read(
+	struct file *filp,
+	char *buf,
+	size_t count,
+	loff_t *ppos)
+{
+	struct inode *inode = filp->f_dentry->d_inode;
+	if (!MSDOS_I(inode)->i_binary)
+		return fat_file_read_text(filp, buf, count, ppos);
+	return generic_file_read(filp, buf, count, ppos);
+}
 /*
 	Write to a file either from user space
 */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov