Page MenuHomeFreeBSD

split: Further option parsing improvements.
ClosedPublic

Authored by des on Sep 28 2023, 1:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
May 7 2024, 5:48 AM
Unknown Object (File)
May 6 2024, 4:22 AM
Unknown Object (File)
May 6 2024, 4:22 AM
Unknown Object (File)
May 3 2024, 12:17 PM
Unknown Object (File)
Dec 13 2023, 4:19 PM
Unknown Object (File)
Nov 1 2023, 5:06 AM
Unknown Object (File)
Oct 11 2023, 11:47 AM
Unknown Object (File)
Oct 11 2023, 11:47 AM
Subscribers

Details

Summary
  • 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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

des requested review of this revision.Sep 28 2023, 1:18 PM

LGTM. It might also be better to have the style changes into a different patch.

This revision is now accepted and ready to land.Sep 28 2023, 1:28 PM
kevans added a subscriber: kevans.
kevans added inline comments.
usr.bin/split/split.c
247–249

Indentation here and the same below on 258 could be fixed while you're in the area on style changes

This revision now requires review to proceed.Sep 28 2023, 4:21 PM
des marked an inline comment as done.Sep 28 2023, 4:24 PM
des added inline comments.
usr.bin/split/split.c
247–249

Done. Note that the error checking is insufficient (if your disk is full it will print “write: No error”) but I'll leave that alone for now.

des marked an inline comment as done.Sep 28 2023, 4:24 PM
This revision is now accepted and ready to land.Sep 28 2023, 4:25 PM
This revision was automatically updated to reflect the committed changes.