From: Lennart Poettering Date: Sat, 17 Jan 2009 01:03:59 +0000 (+0100) Subject: dump profiles when listing cards X-Git-Tag: submit/2.0-panda/20130828.192557~2454 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f8ba3a9b078297db8dfcd6c4576567712162e0b8;p=profile%2Fivi%2Fpulseaudio-panda.git dump profiles when listing cards --- diff --git a/src/pulsecore/cli-text.c b/src/pulsecore/cli-text.c index 0f4a273..c9a82cb 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);