lkml.org 
[lkml]   [2006]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 7 of 11] VFS: Use SEEK_{SET, CUR, END} instead of hardcoded values
Date
From
VFS: Use SEEK_{SET,CUR,END} instead of hardcoded values

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>

--

diff -r ca33dbd739b3 -r 1622a39ffb54 fs/locks.c
--- a/fs/locks.c Sat Sep 16 21:00:45 2006 -0400
+++ b/fs/locks.c Sat Sep 16 21:00:45 2006 -0400
@@ -314,13 +314,13 @@ static int flock_to_posix_lock(struct fi
off_t start, end;

switch (l->l_whence) {
- case 0: /*SEEK_SET*/
+ case SEEK_SET:
start = 0;
break;
- case 1: /*SEEK_CUR*/
+ case SEEK_CUR:
start = filp->f_pos;
break;
- case 2: /*SEEK_END*/
+ case SEEK_END:
start = i_size_read(filp->f_dentry->d_inode);
break;
default:
@@ -364,13 +364,13 @@ static int flock64_to_posix_lock(struct
loff_t start;

switch (l->l_whence) {
- case 0: /*SEEK_SET*/
+ case SEEK_SET:
start = 0;
break;
- case 1: /*SEEK_CUR*/
+ case SEEK_CUR:
start = filp->f_pos;
break;
- case 2: /*SEEK_END*/
+ case SEEK_END:
start = i_size_read(filp->f_dentry->d_inode);
break;
default:

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

\
 
 \ /
  Last update: 2006-09-17 03:55    [W:0.088 / U:0.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site