From: Chris Snook <[EMAIL PROTECTED]>

Convert magic numbers to SEEK_* values from fs.h

Signed-off-by: Chris Snook <[EMAIL PROTECTED]>
--
--- a/fs/read_write.c   2007-02-20 14:49:45.000000000 -0500
+++ b/fs/read_write.c   2007-02-20 16:48:39.000000000 -0500
@@ -37,10 +37,10 @@ loff_t generic_file_llseek(struct file *

        mutex_lock(&inode->i_mutex);
        switch (origin) {
-               case 2:
+               case SEEK_END:
                        offset += inode->i_size;
                        break;
-               case 1:
+               case SEEK_CUR:
                        offset += file->f_pos;
        }
        retval = -EINVAL;
@@ -63,10 +63,10 @@ loff_t remote_llseek(struct file *file,

        lock_kernel();
        switch (origin) {
-               case 2:
+               case SEEK_END:
                        offset += i_size_read(file->f_path.dentry->d_inode);
                        break;
-               case 1:
+               case SEEK_CUR:
                        offset += file->f_pos;
        }
        retval = -EINVAL;
@@ -94,10 +94,10 @@ loff_t default_llseek(struct file *file,

        lock_kernel();
        switch (origin) {
-               case 2:
+               case SEEK_END:
                        offset += i_size_read(file->f_path.dentry->d_inode);
                        break;
-               case 1:
+               case SEEK_CUR:
                        offset += file->f_pos;
        }
        retval = -EINVAL;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to