patch-2.0.21-2.1.0 linux/fs/fat/file.c
Next file: linux/fs/fat/misc.c
Previous file: linux/fs/fat/dir.c
Back to the patch index
Back to the overall index
- Lines: 46
- Date:
Sat Sep 28 23:39:17 1996
- Orig file:
lx2.0/v2.0.21/linux/fs/fat/file.c
- Orig date:
Fri May 10 07:54:52 1996
diff -u --recursive --new-file lx2.0/v2.0.21/linux/fs/fat/file.c linux/fs/fat/file.c
@@ -152,11 +152,11 @@
/*
Read a file into user space
*/
-int fat_file_read(
+long fat_file_read(
struct inode *inode,
struct file *filp,
char *buf,
- int count)
+ unsigned long count)
{
struct super_block *sb = inode->i_sb;
char *start = buf;
@@ -175,7 +175,7 @@
printk("fat_file_read: mode = %07o\n",inode->i_mode);
return -EINVAL;
}
- if (filp->f_pos >= inode->i_size || count <= 0) return 0;
+ if (filp->f_pos >= inode->i_size || count == 0) return 0;
/*
Tell the buffer cache which block we expect to read in advance
Since we are limited with the stack, we preread only MSDOS_PREFETCH
@@ -269,11 +269,11 @@
/*
Write to a file either from user space
*/
-int fat_file_write(
+long fat_file_write(
struct inode *inode,
struct file *filp,
const char *buf,
- int count)
+ unsigned long count)
{
struct super_block *sb = inode->i_sb;
int sector,offset,size,left,written;
@@ -301,7 +301,7 @@
*/
if (filp->f_flags & O_APPEND)
filp->f_pos = inode->i_size;
- if (count <= 0)
+ if (count == 0)
return 0;
error = carry = 0;
for (start = buf; count || carry; count -= size) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov