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

Reply via email to