From 99bddabb317e8d8aa0ea11dcce9425dbf7f9258d Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 4 Jan 2010 17:29:35 -0800 Subject: [PATCH] 6913996 bogus newlines in audioctl show-control output --- usr/src/cmd/audio/audioctl/audioctl.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/usr/src/cmd/audio/audioctl/audioctl.c b/usr/src/cmd/audio/audioctl/audioctl.c index 0bceee7eb9..660d543fc2 100644 --- a/usr/src/cmd/audio/audioctl/audioctl.c +++ b/usr/src/cmd/audio/audioctl/audioctl.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -565,8 +565,13 @@ print_control(FILE *sfp, device_t *d, cinfo_t *cinfop, int vopt) col.col_sel = selbuf; print_control_line(sfp, &col, vopt); + /* non-verbose mode prints don't display the enum values */ + if ((!vopt) || (sfp != NULL)) { + return (0); + } + /* print leftover enum value selections */ - while ((sfp == NULL) && (idx >= 0) && (idx < cinfop->ci.maxvalue)) { + while ((idx >= 0) && (idx < cinfop->ci.maxvalue)) { selbuf[0] = 0; for (i = idx; i < cinfop->ci.maxvalue; i++) { str = get_enum_str(cinfop, i); -- 2.11.4.GIT