Page MenuHomeFreeBSD

mixer(8): Improve error messsages and warnings
ClosedPublic

Authored by christos on Feb 8 2024, 3:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 14, 4:16 PM
Unknown Object (File)
Oct 5 2024, 7:00 AM
Unknown Object (File)
Sep 8 2024, 10:41 PM
Unknown Object (File)
Sep 4 2024, 8:26 PM
Unknown Object (File)
Sep 2 2024, 7:41 AM
Unknown Object (File)
Aug 31 2024, 10:38 AM
Unknown Object (File)
Aug 31 2024, 10:38 AM
Unknown Object (File)
Aug 31 2024, 10:38 AM
Subscribers

Details

Summary

No functional change intended.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 55865
Build 52754: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Feb 8 2024, 4:00 PM

Just some random testing, with no pcm devices I get:

# mixer -a
mixer: mixer_get_nmixers(): No error: 0
# mixer
mixer: mixer_open((null)): No error: 0

This case could be handled with a less cryptic message.

Improve error message for mixer_get_nmixers() and mixer_open() failures.

This revision now requires review to proceed.Feb 9 2024, 8:51 PM
This revision is now accepted and ready to land.Feb 10 2024, 12:29 AM
usr.sbin/mixer/mixer.c
70

This code should set errno to 0 before calling strtol(). Otherwise a stale errno value might be left over from a previous libc call.

christos marked an inline comment as done.

Clear errno before calling strtol().

This revision now requires review to proceed.Feb 12 2024, 10:44 AM
This revision was not accepted when it landed; it landed in state Needs Review.Feb 12 2024, 11:01 AM
This revision was automatically updated to reflect the committed changes.