* [PATCH] fstests: Fix duplicate CLI arguments in fssum
@ 2020-04-28 7:53 Arvind Raghavan
2020-04-30 0:11 ` Arvind Raghavan
0 siblings, 1 reply; 2+ messages in thread
From: Arvind Raghavan @ 2020-04-28 7:53 UTC (permalink / raw)
To: fstests
Cc: Amir Goldstein, Arvind Raghavan, Jayashree Mohan, Vijay Chidambaram
fssum currently has a duplicate '-x' flag. This patch renames one of the
duplicate flags and makes the appropriate doc changes.
Signed-off-by: Arvind Raghavan <raghavan.arvind@gmail.com>
Signed-off-by: Jayashree Mohan <jaya@cs.utexas.edu>
Signed-off-by: Vijay Chidambaram <vijay@cs.utexas.edu>
---
src/fssum.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/fssum.c b/src/fssum.c
index a243839a..b49ba59b 100644
--- a/src/fssum.c
+++ b/src/fssum.c
@@ -150,9 +150,9 @@ usage(void)
fprintf(stderr, " -[UGOAMCDXES]: exclude respective field from calculation\n");
fprintf(stderr, " -n : reset all flags\n");
fprintf(stderr, " -N : set all flags\n");
- fprintf(stderr, " -x path : exclude path when building checksum (multiple ok)\n");
+ fprintf(stderr, " -i path : ignore path when building checksum (multiple ok)\n");
fprintf(stderr, " -h : this help\n\n");
- fprintf(stderr, "The default field mask is ugoamCdES. If the checksum/manifest is read from a\n");
+ fprintf(stderr, "The default field mask is ugoamCdxES. If the checksum/manifest is read from a\n");
fprintf(stderr, "file, the mask is taken from there and the values given on the command line\n");
fprintf(stderr, "are ignored.\n");
exit(-1);
@@ -713,7 +713,7 @@ main(int argc, char *argv[])
int plen;
int elen;
int n_flags = 0;
- const char *allopts = "heEfuUgGoOaAmMcCdDsSnNw:r:vx:";
+ const char *allopts = "heEfuUgGoOaAmMcCdDxXsSnNw:r:vi:";
out_fp = stdout;
while ((c = getopt(argc, argv, allopts)) != EOF) {
@@ -735,6 +735,8 @@ main(int argc, char *argv[])
case 'C':
case 'd':
case 'D':
+ case 'x':
+ case 'X':
case 'e':
case 'E':
case 's':
@@ -768,7 +770,7 @@ main(int argc, char *argv[])
exit(-1);
}
break;
- case 'x':
+ case 'i':
++n_excludes;
excludes = realloc(excludes,
sizeof(*excludes) * n_excludes);
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fstests: Fix duplicate CLI arguments in fssum
2020-04-28 7:53 [PATCH] fstests: Fix duplicate CLI arguments in fssum Arvind Raghavan
@ 2020-04-30 0:11 ` Arvind Raghavan
0 siblings, 0 replies; 2+ messages in thread
From: Arvind Raghavan @ 2020-04-30 0:11 UTC (permalink / raw)
To: fstests; +Cc: Amir Goldstein, Jayashree Mohan, Vijay Chidambaram
Looking around the xfstest repo, I realized that there are in fact
test cases that use the '-x' flag in fssum to exclude paths, so
this patch breaks them. I'll send out a V2 that preserves the
behavior of '-x' and renames the other flag.
On Tue, Apr 28, 2020 at 1:28 PM Arvind Raghavan
<raghavan.arvind@gmail.com> wrote:
>
> fssum currently has a duplicate '-x' flag. This patch renames one of the
> duplicate flags and makes the appropriate doc changes.
>
> Signed-off-by: Arvind Raghavan <raghavan.arvind@gmail.com>
> Signed-off-by: Jayashree Mohan <jaya@cs.utexas.edu>
> Signed-off-by: Vijay Chidambaram <vijay@cs.utexas.edu>
> ---
> src/fssum.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/src/fssum.c b/src/fssum.c
> index a243839a..b49ba59b 100644
> --- a/src/fssum.c
> +++ b/src/fssum.c
> @@ -150,9 +150,9 @@ usage(void)
> fprintf(stderr, " -[UGOAMCDXES]: exclude respective field from calculation\n");
> fprintf(stderr, " -n : reset all flags\n");
> fprintf(stderr, " -N : set all flags\n");
> - fprintf(stderr, " -x path : exclude path when building checksum (multiple ok)\n");
> + fprintf(stderr, " -i path : ignore path when building checksum (multiple ok)\n");
> fprintf(stderr, " -h : this help\n\n");
> - fprintf(stderr, "The default field mask is ugoamCdES. If the checksum/manifest is read from a\n");
> + fprintf(stderr, "The default field mask is ugoamCdxES. If the checksum/manifest is read from a\n");
> fprintf(stderr, "file, the mask is taken from there and the values given on the command line\n");
> fprintf(stderr, "are ignored.\n");
> exit(-1);
> @@ -713,7 +713,7 @@ main(int argc, char *argv[])
> int plen;
> int elen;
> int n_flags = 0;
> - const char *allopts = "heEfuUgGoOaAmMcCdDsSnNw:r:vx:";
> + const char *allopts = "heEfuUgGoOaAmMcCdDxXsSnNw:r:vi:";
>
> out_fp = stdout;
> while ((c = getopt(argc, argv, allopts)) != EOF) {
> @@ -735,6 +735,8 @@ main(int argc, char *argv[])
> case 'C':
> case 'd':
> case 'D':
> + case 'x':
> + case 'X':
> case 'e':
> case 'E':
> case 's':
> @@ -768,7 +770,7 @@ main(int argc, char *argv[])
> exit(-1);
> }
> break;
> - case 'x':
> + case 'i':
> ++n_excludes;
> excludes = realloc(excludes,
> sizeof(*excludes) * n_excludes);
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-30 0:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-28 7:53 [PATCH] fstests: Fix duplicate CLI arguments in fssum Arvind Raghavan
2020-04-30 0:11 ` Arvind Raghavan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).