From e055f37a98c690a78a027a739c66bae7b73d4d1d Mon Sep 17 00:00:00 2001 From: Xiao Yang Date: Wed, 29 Jul 2020 21:02:15 -0400 Subject: [PATCH] xfs_io: Remove redundant setting/check for lsattr/stat command lsattr/stat command can check exclusive options by argmax = 1 so the related setting/check is redundant. Signed-off-by: Xiao Yang Reviewed-by: Eric Sandeen Signed-off-by: Eric Sandeen --- io/attr.c | 2 -- io/stat.c | 5 ----- 2 files changed, 7 deletions(-) diff --git a/io/attr.c b/io/attr.c index 181ff0895..fd82a2e73 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 5f513e0dd..49c4c27c1 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.39.2