[pulseaudio-discuss] [PATCH] pactl: Remove deprecated 'stat' behaviour

Peter Meerwald pmeerw at pmeerw.net
Fri Oct 31 15:28:01 PDT 2014


From: Peter Meerwald <p.meerwald at bct-electronic.com>

the stat command should only output statistics, not info

behaviour was deprecated anno 2011 in 8ace9185 "pactl: Make stat backwards
compatible" -- fix this now

Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
---
 man/pactl.1.xml.in |  7 ++-----
 src/utils/pactl.c  | 14 ++------------
 2 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/man/pactl.1.xml.in b/man/pactl.1.xml.in
index a195b1d..cf6570e 100644
--- a/man/pactl.1.xml.in
+++ b/man/pactl.1.xml.in
@@ -66,11 +66,8 @@ USA.
   <section name="Commands">
 
     <option>
-      <p><opt>stat</opt> [<arg>short</arg>]</p>
-      <optdesc><p>Dump a few statistics about the memory usage of the PulseAudio daemon. (Note: for backwards
-      compatibility, we also show the output of the <arg>info</arg> command. In order to only show
-      statistics, use the optional <arg>short</arg> argument. In a future version of PA we will
-      make this the default)</p></optdesc>
+      <p><opt>stat</opt></p>
+      <optdesc><p>Dump a few statistics about the memory usage of the PulseAudio daemon.</p></optdesc>
     </option>
 
     <option>
diff --git a/src/utils/pactl.c b/src/utils/pactl.c
index 13ea649..f6555b9 100644
--- a/src/utils/pactl.c
+++ b/src/utils/pactl.c
@@ -1201,14 +1201,7 @@ static void context_state_callback(pa_context *c, void *userdata) {
             switch (action) {
                 case STAT:
                     o = pa_context_stat(c, stat_callback, NULL);
-                    if (short_list_format)
-                        break;
-
-                    if (o) {
-                        pa_operation_unref(o);
-                        actions++;
-                    }
-                    /* Fall through */
+                    break;
 
                 case INFO:
                     o = pa_context_get_server_info(c, get_server_info_callback, NULL);
@@ -1563,7 +1556,7 @@ static enum mute_flags parse_mute(const char *mute_text) {
 
 static void help(const char *argv0) {
 
-    printf("%s %s %s\n",    argv0, _("[options]"), "stat [short]");
+    printf("%s %s %s\n",    argv0, _("[options]"), "stat");
     printf("%s %s %s\n",    argv0, _("[options]"), "info");
     printf("%s %s %s %s\n", argv0, _("[options]"), "list [short]", _("[TYPE]"));
     printf("%s %s %s\n",    argv0, _("[options]"), "exit");
@@ -1665,9 +1658,6 @@ int main(int argc, char *argv[]) {
     if (optind < argc) {
         if (pa_streq(argv[optind], "stat")) {
             action = STAT;
-            short_list_format = false;
-            if (optind+1 < argc && pa_streq(argv[optind+1], "short"))
-                short_list_format = true;
 
         } else if (pa_streq(argv[optind], "info"))
             action = INFO;
-- 
1.9.1



More information about the pulseaudio-discuss mailing list