summaryrefslogtreecommitdiffstats
path: root/src/utils/pactl.c
diff options
context:
space:
mode:
authorMaarten Bosmans <mkbosmans@gmail.com>2011-03-26 17:15:42 +0100
committerColin Guthrie <colin@mageia.org>2011-03-29 21:23:56 +0100
commit8f25f8dc7d41cec7f644391b2a76613cd994133b (patch)
tree92513e33698ee067fc56033b5b37b8cc4a307a73 /src/utils/pactl.c
parent67760e3193533b169f6f96f0b4f297150f82d758 (diff)
pactl: Separate stat and info actions
Diffstat (limited to 'src/utils/pactl.c')
-rw-r--r--src/utils/pactl.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/utils/pactl.c b/src/utils/pactl.c
index e3c2aa21..cfa96fe5 100644
--- a/src/utils/pactl.c
+++ b/src/utils/pactl.c
@@ -90,6 +90,7 @@ static enum {
NONE,
EXIT,
STAT,
+ INFO,
UPLOAD_SAMPLE,
PLAY_SAMPLE,
REMOVE_SAMPLE,
@@ -882,8 +883,10 @@ static void context_state_callback(pa_context *c, void *userdata) {
case PA_CONTEXT_READY:
switch (action) {
case STAT:
- actions = 2;
pa_operation_unref(pa_context_stat(c, stat_callback, NULL));
+ break;
+
+ case INFO:
pa_operation_unref(pa_context_get_server_info(c, get_server_info_callback, NULL));
break;
@@ -1122,6 +1125,7 @@ static int parse_volume(const char *vol_spec, pa_volume_t *vol, enum volume_flag
static void help(const char *argv0) {
printf(_("%s [options] stat\n"
+ "%s [options] info\n"
"%s [options] list [TYPE]\n"
"%s [options] exit\n"
"%s [options] upload-sample FILENAME [NAME]\n"
@@ -1151,7 +1155,7 @@ static void help(const char *argv0) {
argv0, argv0, argv0, argv0, argv0,
argv0, argv0, argv0, argv0, argv0,
argv0, argv0, argv0, argv0, argv0,
- argv0, argv0);
+ argv0, argv0, argv0);
}
enum {
@@ -1224,6 +1228,9 @@ int main(int argc, char *argv[]) {
if (pa_streq(argv[optind], "stat"))
action = STAT;
+ else if (pa_streq(argv[optind], "info"))
+ action = INFO;
+
else if (pa_streq(argv[optind], "exit"))
action = EXIT;