Files
findutils/tests
Bernhard Voelker 4a72809272 find: fix error diagnostics of options with mandatory, numeric arguments
The error diagnostic for wrong invocations with option that require
numeric arguments (-inum, -links, -gid, -uid) was wrong and not helpful:
  $ find -gid
  find: invalid argument `-gid' to `-gid'

* find/parser.c (parse_gid): Remove changing back of the ARG_PTR in
the error case; thus simplify.
(parse_inum,parse_links,parse_uid): Likewise.
(get_num): While at it, mention -gid and -uid in the comment as well.
(insert_num): Also improve the error diagnostic in the case the user
has provided a non-numeric argument.  Previously, it was just "invalid
argument".
* tests/find/opt-numeric-arg.sh: Add test.
* tests/local.mk: Reference it.
* NEWS (Bug Fixes): Mention the fix.

Reported by Andreas Schwab <schwab@linux-m68k.org> in
<https://lists.gnu.org/r/bug-findutils/2023-01/msg00001.html>
2023-01-05 19:43:25 +01:00
..
2023-01-01 23:51:03 +01:00