Page MenuHomeFreeBSD

printenv: Clean up
ClosedPublic

Authored by des on Apr 18 2026, 4:52 PM.
Tags
None
Referenced Files
F162636965: D56506.diff
Wed, Jul 15, 7:18 AM
F162636964: D56506.diff
Wed, Jul 15, 7:18 AM
Unknown Object (File)
Thu, Jul 2, 2:16 AM
Unknown Object (File)
Wed, Jul 1, 4:37 AM
Unknown Object (File)
Fri, Jun 26, 10:41 PM
Unknown Object (File)
Mon, Jun 22, 5:19 PM
Unknown Object (File)
Jun 13 2026, 2:20 AM
Unknown Object (File)
May 15 2026, 3:36 PM
Subscribers

Details

Summary
  • Error out if more than one argument is given.
  • Check for stdio errors.
  • Clean up the code.
  • Clean up and expand the tests.

MFC after: 1 week

Diff Detail

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

Event Timeline

des requested review of this revision.Apr 18 2026, 4:52 PM
ngie added a subscriber: ngie.
ngie added inline comments.
usr.bin/printenv/tests/printenv_test.sh
45

How about this instead? It might be a bit easier to read/understand.

87

Why pipe these commands to true?

This revision is now accepted and ready to land.Apr 21 2026, 4:33 AM
des marked 2 inline comments as done.Apr 21 2026, 6:08 AM
des added inline comments.
usr.bin/printenv/tests/printenv_test.sh
45

It also does not work.

87

To cause a write failure.

des marked 2 inline comments as done.Apr 21 2026, 6:08 AM
This revision was automatically updated to reflect the committed changes.