HomeFreeBSD

split: Further option parsing improvements.

Description

split: Further option parsing improvements.

  • Whenever possible, use strtonum() to parse numeric arguments.
  • Improve usefulness and consistency of error messages.
  • While here, fix some type and style issues.

Sponsored by: Klara, Inc.
Reviewed by: christos, kevans
Differential Revision: https://reviews.freebsd.org/D42010

(cherry picked from commit d7399551b02861b910b15c7b7a78a2835644aa45)

split: Improve GNU compatibility.

  • Like GNU split, turn autoextend back on if given -a0.
  • Add a test case that verifies that -a<non-zero> turns autoextend off.
  • Add a test case that verifies that -a0 turns autoextend back on.

Sponsored by: Klara, Inc.
Reviewed by: christos, kevans
Differential Revision: https://reviews.freebsd.org/D42011

(cherry picked from commit d9d69a6f6fc1f8d80df9ce6493e8ab9388781615)

Details

Provenance
desAuthored on Sep 28 2023, 4:29 PM
Reviewer
christos
Differential Revision
D42010: split: Further option parsing improvements.
Parents
rGb9c361e4af26: libc: Rewrite quick_exit() and at_quick_exit() using C11 atomics.
Branches
Unknown
Tags
Unknown