* [v2] fstests: Fix duplicate CLI arguments in fssum
@ 2020-04-30 0:13 Arvind Raghavan
2020-04-30 6:30 ` Amir Goldstein
0 siblings, 1 reply; 2+ messages in thread
From: Arvind Raghavan @ 2020-04-30 0:13 UTC (permalink / raw)
To: fstests
Cc: Amir Goldstein, Arvind Raghavan, Jayashree Mohan, Vijay Chidambaram
fssum currently has a duplicate '-x' flag, which is used for both
excluding paths and including xattrs. As the former is the only one
currently used in xfstests, this patch renames the latter to use '-t'.
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 | 49 +++++++++++++++++++++++++------------------------
1 file changed, 25 insertions(+), 24 deletions(-)
diff --git a/src/fssum.c b/src/fssum.c
index a243839a..3d97a70b 100644
--- a/src/fssum.c
+++ b/src/fssum.c
@@ -77,7 +77,7 @@ enum _flags {
NUM_FLAGS
};
-const char flchar[] = "ugoamcdxes";
+const char flchar[] = "ugoamcdtes";
char line[65536];
int flags[NUM_FLAGS] = {1, 1, 1, 1, 1, 0, 1, 1, 0, 0};
@@ -131,28 +131,27 @@ usage(void)
{
fprintf(stderr, "usage: fssum <options> <path>\n");
fprintf(stderr, " options:\n");
- fprintf(stderr, " -f : write out a full manifest file\n");
- fprintf(stderr, " -w <file> : send output to file\n");
- fprintf(stderr, " -v : verbose mode (debugging only)\n");
- fprintf(stderr,
- " -r <file> : read checksum or manifest from file\n");
- fprintf(stderr, " -[ugoamcdxe]: specify which fields to include in checksum calculation.\n");
- fprintf(stderr, " u : include uid\n");
- fprintf(stderr, " g : include gid\n");
- fprintf(stderr, " o : include mode\n");
- fprintf(stderr, " m : include mtime\n");
- fprintf(stderr, " a : include atime\n");
- fprintf(stderr, " c : include ctime\n");
- fprintf(stderr, " d : include file data\n");
- fprintf(stderr, " x : include xattrs\n");
- fprintf(stderr, " e : include open errors (aborts otherwise)\n");
- fprintf(stderr, " s : include block structure (holes)\n");
- 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, " -h : this help\n\n");
- fprintf(stderr, "The default field mask is ugoamCdES. If the checksum/manifest is read from a\n");
+ fprintf(stderr, " -f : write out a full manifest file\n");
+ fprintf(stderr, " -w <file> : send output to file\n");
+ fprintf(stderr, " -v : verbose mode (debugging only)\n");
+ fprintf(stderr, " -r <file> : read checksum or manifest from file\n");
+ fprintf(stderr, " -[ugoamcdtes]: specify which fields to include in checksum calculation.\n");
+ fprintf(stderr, " u : include uid\n");
+ fprintf(stderr, " g : include gid\n");
+ fprintf(stderr, " o : include mode\n");
+ fprintf(stderr, " m : include mtime\n");
+ fprintf(stderr, " a : include atime\n");
+ fprintf(stderr, " c : include ctime\n");
+ fprintf(stderr, " d : include file data\n");
+ fprintf(stderr, " t : include xattrs\n");
+ fprintf(stderr, " e : include open errors (aborts otherwise)\n");
+ fprintf(stderr, " s : include block structure (holes)\n");
+ fprintf(stderr, " -[UGOAMCDTES]: 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, " -h : this help\n\n");
+ fprintf(stderr, "The default field mask is ugoamCdtES. 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 +712,7 @@ main(int argc, char *argv[])
int plen;
int elen;
int n_flags = 0;
- const char *allopts = "heEfuUgGoOaAmMcCdDsSnNw:r:vx:";
+ const char *allopts = "heEfuUgGoOaAmMcCdDtTsSnNw:r:vx:";
out_fp = stdout;
while ((c = getopt(argc, argv, allopts)) != EOF) {
@@ -735,6 +734,8 @@ main(int argc, char *argv[])
case 'C':
case 'd':
case 'D':
+ case 'T':
+ case 't':
case 'e':
case 'E':
case 's':
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [v2] fstests: Fix duplicate CLI arguments in fssum
2020-04-30 0:13 [v2] fstests: Fix duplicate CLI arguments in fssum Arvind Raghavan
@ 2020-04-30 6:30 ` Amir Goldstein
0 siblings, 0 replies; 2+ messages in thread
From: Amir Goldstein @ 2020-04-30 6:30 UTC (permalink / raw)
To: Arvind Raghavan; +Cc: fstests, Jayashree Mohan, Vijay Chidambaram, Eryu Guan
On Thu, Apr 30, 2020 at 3:14 AM Arvind Raghavan
<raghavan.arvind@gmail.com> wrote:
>
> fssum currently has a duplicate '-x' flag, which is used for both
> excluding paths and including xattrs. As the former is the only one
> currently used in xfstests, this patch renames the latter to use '-t'.
>
> 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>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
> ---
> src/fssum.c | 49 +++++++++++++++++++++++++------------------------
> 1 file changed, 25 insertions(+), 24 deletions(-)
>
> diff --git a/src/fssum.c b/src/fssum.c
> index a243839a..3d97a70b 100644
> --- a/src/fssum.c
> +++ b/src/fssum.c
> @@ -77,7 +77,7 @@ enum _flags {
> NUM_FLAGS
> };
>
> -const char flchar[] = "ugoamcdxes";
> +const char flchar[] = "ugoamcdtes";
> char line[65536];
>
> int flags[NUM_FLAGS] = {1, 1, 1, 1, 1, 0, 1, 1, 0, 0};
> @@ -131,28 +131,27 @@ usage(void)
> {
> fprintf(stderr, "usage: fssum <options> <path>\n");
> fprintf(stderr, " options:\n");
> - fprintf(stderr, " -f : write out a full manifest file\n");
> - fprintf(stderr, " -w <file> : send output to file\n");
> - fprintf(stderr, " -v : verbose mode (debugging only)\n");
> - fprintf(stderr,
> - " -r <file> : read checksum or manifest from file\n");
> - fprintf(stderr, " -[ugoamcdxe]: specify which fields to include in checksum calculation.\n");
> - fprintf(stderr, " u : include uid\n");
> - fprintf(stderr, " g : include gid\n");
> - fprintf(stderr, " o : include mode\n");
> - fprintf(stderr, " m : include mtime\n");
> - fprintf(stderr, " a : include atime\n");
> - fprintf(stderr, " c : include ctime\n");
> - fprintf(stderr, " d : include file data\n");
> - fprintf(stderr, " x : include xattrs\n");
> - fprintf(stderr, " e : include open errors (aborts otherwise)\n");
> - fprintf(stderr, " s : include block structure (holes)\n");
> - 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, " -h : this help\n\n");
> - fprintf(stderr, "The default field mask is ugoamCdES. If the checksum/manifest is read from a\n");
> + fprintf(stderr, " -f : write out a full manifest file\n");
> + fprintf(stderr, " -w <file> : send output to file\n");
> + fprintf(stderr, " -v : verbose mode (debugging only)\n");
> + fprintf(stderr, " -r <file> : read checksum or manifest from file\n");
> + fprintf(stderr, " -[ugoamcdtes]: specify which fields to include in checksum calculation.\n");
> + fprintf(stderr, " u : include uid\n");
> + fprintf(stderr, " g : include gid\n");
> + fprintf(stderr, " o : include mode\n");
> + fprintf(stderr, " m : include mtime\n");
> + fprintf(stderr, " a : include atime\n");
> + fprintf(stderr, " c : include ctime\n");
> + fprintf(stderr, " d : include file data\n");
> + fprintf(stderr, " t : include xattrs\n");
> + fprintf(stderr, " e : include open errors (aborts otherwise)\n");
> + fprintf(stderr, " s : include block structure (holes)\n");
> + fprintf(stderr, " -[UGOAMCDTES]: 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, " -h : this help\n\n");
Changing whitespaces on unrelated lines clutters the diff from the
actual changes.
I would fight the urge to do that or do it in a separate patch.
Thanks,
Amir.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-30 6:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-30 0:13 [v2] fstests: Fix duplicate CLI arguments in fssum Arvind Raghavan
2020-04-30 6:30 ` Amir Goldstein
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.