sndioctl: Print lists as comma separated nodes

This commit is contained in:
Alexandre Ratchov 2020-05-05 06:43:52 +02:00
parent e2d1813cfa
commit 2c8bea3f08
1 changed files with 15 additions and 6 deletions

View File

@ -432,12 +432,21 @@ print_val(struct info *p, int mono)
if (e != firstent(p, e->desc.node1.name))
continue;
}
if (more)
printf(",");
print_node(&e->desc.node1, mono);
printf(":");
print_num(e);
more = 1;
if (e->desc.maxval == 1) {
if (e->curval) {
if (more)
printf(",");
print_node(&e->desc.node1, mono);
more = 1;
}
} else {
if (more)
printf(",");
print_node(&e->desc.node1, mono);
printf(":");
print_num(e);
more = 1;
}
}
}
}