Page MenuHomeFreeBSD

mixer(8): Report an error if passed value is an empty string
ClosedPublic

Authored by 0mp on Aug 24 2019, 10:47 PM.
Tags
None
Referenced Files
F168879380: D21409.id61246.diff
Sun, Aug 30, 2:12 PM
Unknown Object (File)
Thu, Aug 27, 8:39 PM
Unknown Object (File)
Wed, Aug 26, 6:51 PM
Unknown Object (File)
Tue, Aug 25, 2:21 PM
Unknown Object (File)
Tue, Aug 25, 2:16 AM
Unknown Object (File)
Tue, Aug 11, 5:13 AM
Unknown Object (File)
Mon, Aug 10, 4:04 PM
Unknown Object (File)
Mon, Aug 10, 4:03 PM
Subscribers

Details

Summary
mixer(8): Report an error if passed value is an empty string

This patch fixes a bug that made the mixer command enter an infinite loop
when instructed to set the value of a device to an empty string (e.g., `mixer vol ""`).

Additionally, some tests for mixer(8) are being added.

PR:	240039
Test Plan
$ sudo mkdir -p /usr/tests/usr.sbin/mixer/
$ cd src/usr.sbin/mixer
$ make && sudo make install && (cd /usr/tests/usr.sbin/mixer/ && kyua test)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fix a typo in an atf_test description

Looks good to me. Just thinking whether -1 or EOF is more appropriate.

This revision is now accepted and ready to land.Aug 25 2019, 1:37 AM
In D21409#465784, @mav wrote:

Looks good to me. Just thinking whether -1 or EOF is more appropriate.

Probably EOF. I'll change it in the final commit.

Also, do we want to MFC this change?

In D21409#465864, @0mp wrote:

Also, do we want to MFC this change?

Probably. Why not.