[PATCH] xfs_io: Remove redundant setting/check for lsattr/stat command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



lsattr/stat command can check exclusive options by argmax = 1
so the related setting/check is redundant.

Signed-off-by: Xiao Yang <yangx.jy@xxxxxxxxxxxxxx>
---
 io/attr.c | 2 --
 io/stat.c | 5 -----
 2 files changed, 7 deletions(-)

diff --git a/io/attr.c b/io/attr.c
index 181ff089..fd82a2e7 100644
--- a/io/attr.c
+++ b/io/attr.c
@@ -198,10 +198,8 @@ lsattr_f(
 			break;
 		case 'a':
 			aflag = 1;
-			vflag = 0;
 			break;
 		case 'v':
-			aflag = 0;
 			vflag = 1;
 			break;
 		default:
diff --git a/io/stat.c b/io/stat.c
index 5f513e0d..49c4c27c 100644
--- a/io/stat.c
+++ b/io/stat.c
@@ -142,11 +142,6 @@ stat_f(
 		}
 	}
 
-	if (raw && verbose) {
-		exitcode = 1;
-		return command_usage(&stat_cmd);
-	}
-
 	if (fstat(file->fd, &st) < 0) {
 		perror("fstat");
 		exitcode = 1;
-- 
2.21.0






[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux