[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 4/4] stat: support statx DONT_SYNC and FORCE_SYNC flags
From: |
Pádraig Brady |
Subject: |
Re: [PATCH v4 4/4] stat: support statx DONT_SYNC and FORCE_SYNC flags |
Date: |
Fri, 10 May 2019 02:27:34 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 01/05/19 06:57, Jeff Layton wrote:
> diff --git a/src/stat.c b/src/stat.c
> index 2bbc75792b5a..67b334921d48 100644
> --- a/src/stat.c
> +++ b/src/stat.c
> @@ -201,6 +201,9 @@ static struct option const long_options[] =
> {"format", required_argument, NULL, 'c'},
> {"printf", required_argument, NULL, PRINTF_OPTION},
> {"terse", no_argument, NULL, 't'},
> +#if HAVE_STATX && defined STATX_INO
> + {"cached", required_argument, NULL, 'C'},
> +#endif
No need for -C short option I think.
> +#if HAVE_STATX && defined STATX_INO
> + case 'C':
> + if (!strcmp(optarg, "never"))
> + force_sync = true;
> + else if (!strcmp(optarg, "always"))
> + dont_sync = true;
> + else if (strcmp(optarg, "default"))
> + {
> + error (0, 0, _("Unknown --cached= option \"%s\""), optarg);
> + usage (EXIT_FAILURE);
> + }
> + break;
> +#endif
> +
We've refactored support for the above in XARGMATCH
A `make syntax-check` would be useful also.
This is looking good.
thanks!
Pádraig