patch-2.3.29 linux/fs/udf/file.c
Next file: linux/fs/udf/inode.c
Previous file: linux/fs/udf/directory.c
Back to the patch index
Back to the overall index
- Lines: 54
- Date:
Fri Nov 19 11:35:10 1999
- Orig file:
v2.3.28/linux/fs/udf/file.c
- Orig date:
Thu Nov 18 20:25:37 1999
diff -u --recursive --new-file v2.3.28/linux/fs/udf/file.c linux/fs/udf/file.c
@@ -43,11 +43,7 @@
#include "udf_i.h"
#include "udf_sb.h"
-#define NBUF 32
-
-typedef void * poll_table;
-
-static long long udf_file_llseek(struct file *, long long, int);
+static loff_t udf_file_llseek(struct file *, loff_t, int);
static ssize_t udf_file_read_adinicb (struct file *, char *, size_t, loff_t *);
static ssize_t udf_file_write (struct file *, const char *, size_t, loff_t *);
#if BITS_PER_LONG < 64
@@ -152,7 +148,7 @@
/*
* Make sure the offset never goes beyond the 32-bit mark..
*/
-static long long udf_file_llseek(struct file * file, long long offset, int origin)
+static loff_t udf_file_llseek(struct file * file, loff_t offset, int origin)
{
struct inode * inode = file->f_dentry->d_inode;
@@ -169,12 +165,6 @@
break;
}
}
-#if BITS_PER_LONG < 64
- if (((unsigned long long) offset >> 32) != 0)
- {
- return -EINVAL;
- }
-#endif
if (offset != file->f_pos)
{
file->f_pos = offset;
@@ -272,7 +262,8 @@
size_t bufsize, loff_t * loff)
{
struct inode *inode = filp->f_dentry->d_inode;
- Uint32 size, left, pos, block;
+ loff_t size, left, pos;
+ Uint32 block;
struct buffer_head *bh = NULL;
size = inode->i_size;
@@ -454,7 +445,7 @@
*/
static int udf_open_file(struct inode * inode, struct file * filp)
{
- if (inode->i_size == (Uint32)-1 && (filp->f_mode & FMODE_WRITE))
+ if ((inode->i_size & 0xFFFFFFFF00000000UL) && !(filp->f_flags & O_LARGEFILE))
return -EFBIG;
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)