Page MenuHomeFreeBSD

printenv: Clean up
ClosedPublic

Authored by des on Apr 18 2026, 4:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 15, 3:36 PM
Unknown Object (File)
Fri, May 15, 1:43 AM
Unknown Object (File)
Fri, May 15, 1:43 AM
Unknown Object (File)
Thu, May 14, 10:16 PM
Unknown Object (File)
Thu, May 14, 10:15 PM
Unknown Object (File)
Tue, May 12, 2:59 PM
Unknown Object (File)
Tue, May 12, 10:29 AM
Unknown Object (File)
Thu, May 7, 7:50 AM
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.