Skip to contentSkip to conversation

fs/libfs.c: let lseek use SEEK_SET and SEEK_CUR

PATCH In review Yufen Yu 1 participant 2 messages Feb 26, 2019 – Mar 12, 2019 VFS

lore
Share & tools
lore

Yufen Yu

author
#0 lore raw

PATCH 1/1 fs/libfs.c: let lseek use SEEK_SET and SEEK_CUR

Let dcache_dir_lseek() use SEEK_SET and SEEK_CUR to make code more unify.

---
 fs/libfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/libfs.c +2 -2
index 0fb590d79f30..37654d33bd29 100644
@@ -144,9 +144,9 @@ loff_t dcache_dir_lseek(struct file *file, loff_t offset, int whence)
 {
 	struct dentry *dentry = file->f_path.dentry;
 	switch (whence) {
-		case 1:
+		case SEEK_CUR:
 			offset += file->f_pos;
-		case 0:
+		case SEEK_SET:
 			if (offset >= 0)
 				break;
 		default:
Signature · 1 line
2.16.2.dirty
author
#1 lore raw

ping ?

Quoted 24 lines · Yufen Yu

Let dcache_dir_lseek() use SEEK_SET and SEEK_CUR to make code more unify.

---
  fs/libfs.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
fs/libfs.c +2 -2
index 0fb590d79f30..37654d33bd29 100644
@@ -144,9 +144,9 @@ loff_t dcache_dir_lseek(struct file *file, loff_t offset, int whence)
  {
  	struct dentry *dentry = file->f_path.dentry;
  	switch (whence) {
-		case 1:
+		case SEEK_CUR:
  			offset += file->f_pos;
-		case 0:
+		case SEEK_SET:
  			if (offset >= 0)
  				break;
  		default: