From 8f6fb7db78e6149ac87c3cb61409a506eb88ce0b Mon Sep 17 00:00:00 2001 From: gibbs Date: Thu, 14 Jan 1999 05:56:30 +0000 Subject: Properly print devices that do not have attached peripherals. Submitted by: Kenneth Merry --- sbin/camcontrol/camcontrol.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sbin/camcontrol') diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c index 2c90120..fb2f05e 100644 --- a/sbin/camcontrol/camcontrol.c +++ b/sbin/camcontrol/camcontrol.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: camcontrol.c,v 1.7 1998/12/20 18:51:56 mjacob Exp $ + * $Id: camcontrol.c,v 1.8 1998/12/20 20:32:34 mjacob Exp $ */ #include @@ -350,6 +350,9 @@ getdevtree(void) dev_result->path_id, dev_result->target_id, dev_result->target_lun); + + need_close = 1; + break; } case DEV_MATCH_PERIPH: { @@ -358,14 +361,14 @@ getdevtree(void) periph_result = &ccb.cdm.matches[i].result.periph_result; - if (need_close) + if (need_close > 1) fprintf(stdout, ","); fprintf(stdout, "%s%d", periph_result->periph_name, periph_result->unit_number); - need_close = 1; + need_close++; break; } default: -- cgit v1.1