Page MenuHomeFreeBSD

mixer(8): Improve error messsages and warnings
ClosedPublic

Authored by christos on Feb 8 2024, 3:17 PM.
Tags
None
Referenced Files
F84341559: D43793.diff
Wed, May 22, 3:28 PM
Unknown Object (File)
Thu, May 16, 9:27 PM
Unknown Object (File)
Tue, May 14, 10:18 PM
Unknown Object (File)
Tue, May 14, 10:18 PM
Unknown Object (File)
Tue, May 14, 10:06 PM
Unknown Object (File)
Sat, Apr 27, 8:49 AM
Unknown Object (File)
Sat, Apr 27, 8:00 AM
Unknown Object (File)
Sat, Apr 27, 8:00 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 55892
Build 52781: 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.