Page MenuHomeFreeBSD

split: Further option parsing improvements.
ClosedPublic

Authored by des on Sep 28 2023, 1:18 PM.
Tags
None
Referenced Files
F86887166: D42010.id127900.diff
Thu, Jun 27, 1:32 AM
F86874328: D42010.id127900.diff
Wed, Jun 26, 9:02 PM
Unknown Object (File)
Wed, Jun 26, 1:16 AM
Unknown Object (File)
Wed, Jun 26, 12:25 AM
Unknown Object (File)
Tue, Jun 25, 9:59 PM
Unknown Object (File)
Tue, Jun 25, 6:14 PM
Unknown Object (File)
Mon, Jun 24, 6:04 AM
Unknown Object (File)
Fri, Jun 21, 6:12 PM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 53759
Build 50650: arc lint + arc unit

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.