Bug 90117 - Error msg from pactl not quite accurate for 'mute' commands
Summary: Error msg from pactl not quite accurate for 'mute' commands
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: tools (show other bugs)
Version: unspecified
Hardware: All All
: medium minor
Assignee: DEEPAK SRIVASTAVA
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-20 16:21 UTC by hortplumber
Modified: 2015-08-12 13:22 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description hortplumber 2015-04-20 16:21:50 UTC
The parameter 'toggle' is legal for pactl 'mute' commands, but if you forget to specify the parameter on the commandline the resulting error message isn't quite right:

   $ pactl set-sink-mute 0 
   You have to specify a sink name/index and a mute boolean

Last part of error string should probably be changed to something like

      "...and a mute action (0, 1, or 'toggle')"
Comment 1 DEEPAK SRIVASTAVA 2015-06-26 04:52:07 UTC
http://lists.freedesktop.org/archives/pulseaudio-discuss/2015-June/024063.html


Updated the error string for mute commands in pactl. If someone forget to specify
the parameter on the commandline the resulting error message isn't quite right.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=90117

Signed-off-by: Deepak Srivastava <srivastava.d at samsung.com>
---
 src/utils/pactl.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/utils/pactl.c b/src/utils/pactl.c
index d6791d4..e9bf005 100644
--- a/src/utils/pactl.c
+++ b/src/utils/pactl.c
@@ -1953,7 +1953,7 @@ int main(int argc, char *argv[]) {
             action = SET_SINK_MUTE;
 
             if (argc != optind+3) {
-                pa_log(_("You have to specify a sink name/index and a mute boolean"));
+                pa_log(_("You have to specify a sink name/index and a mute action (0, 1, or 'toggle')"));
                 goto quit;
             }
 
@@ -1968,7 +1968,7 @@ int main(int argc, char *argv[]) {
             action = SET_SOURCE_MUTE;
 
             if (argc != optind+3) {
-                pa_log(_("You have to specify a source name/index and a mute boolean"));
+                pa_log(_("You have to specify a source name/index and a mute action (0, 1, or 'toggle')"));
                 goto quit;
             }
 
@@ -1983,7 +1983,7 @@ int main(int argc, char *argv[]) {
             action = SET_SINK_INPUT_MUTE;
 
             if (argc != optind+3) {
-                pa_log(_("You have to specify a sink input index and a mute boolean"));
+                pa_log(_("You have to specify a sink input index and a mute action (0, 1, or 'toggle')"));
                 goto quit;
             }
 
@@ -2001,7 +2001,7 @@ int main(int argc, char *argv[]) {
             action = SET_SOURCE_OUTPUT_MUTE;
 
             if (argc != optind+3) {
-                pa_log(_("You have to specify a source output index and a mute boolean"));
+                pa_log(_("You have to specify a source output index and a mute action (0, 1, or 'toggle')"));
                 goto quit;
             }
 
-- 
1.7.9.5
Comment 2 Tanu Kaskinen 2015-08-12 13:22:38 UTC
Patch applied.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.