summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1999-01-14 05:56:30 +0000
committergibbs <gibbs@FreeBSD.org>1999-01-14 05:56:30 +0000
commit8f6fb7db78e6149ac87c3cb61409a506eb88ce0b (patch)
treefd48dd0f3e036700793e398b618117c2e8e54ad9
parentfc143890809d586da2d75c248fef561290e88c28 (diff)
downloadFreeBSD-src-8f6fb7db78e6149ac87c3cb61409a506eb88ce0b.zip
FreeBSD-src-8f6fb7db78e6149ac87c3cb61409a506eb88ce0b.tar.gz
Properly print devices that do not have attached peripherals.
Submitted by: Kenneth Merry <ken@FreeBSD.org>
-rw-r--r--sbin/camcontrol/camcontrol.c9
1 files changed, 6 insertions, 3 deletions
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 <sys/ioctl.h>
@@ -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:
OpenPOWER on IntegriCloud