From f8ba3a9b078297db8dfcd6c4576567712162e0b8 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 17 Jan 2009 02:03:59 +0100 Subject: dump profiles when listing cards --- src/pulsecore/cli-text.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/pulsecore/cli-text.c') diff --git a/src/pulsecore/cli-text.c b/src/pulsecore/cli-text.c index 0f4a273d..c9a82cb1 100644 --- a/src/pulsecore/cli-text.c +++ b/src/pulsecore/cli-text.c @@ -123,9 +123,22 @@ char *pa_card_list_to_string(pa_core *c) { if (card->module) pa_strbuf_printf(s, "\towner module: %u\n", card->module->index); - t = pa_proplist_to_string(card->proplist); - pa_strbuf_printf(s, "\tproperties:\n%s", t); + t = pa_proplist_to_string_sep(card->proplist, "\n\t\t"); + pa_strbuf_printf(s, "\tproperties:\n\t\t%s\n", t); pa_xfree(t); + + if (card->profiles) { + pa_card_profile *p; + void *state = NULL; + + pa_strbuf_puts( + s, + "\tprofiles:\n"); + + while ((p = pa_hashmap_iterate(card->profiles, &state, NULL))) + pa_strbuf_printf(s, "\t\t%s: %s\n", p->name, p->description); + } + } return pa_strbuf_tostring_free(s); -- cgit