summaryrefslogtreecommitdiffstats
path: root/sys/dev/ciss/ciss.c
diff options
context:
space:
mode:
authorsbruno <sbruno@FreeBSD.org>2013-07-27 17:20:43 +0000
committersbruno <sbruno@FreeBSD.org>2013-07-27 17:20:43 +0000
commitd872a65707c434e00ef9c818fd11e684e0e159ba (patch)
tree16f46c7eea0bb838d8f05f58446f6873cd87f9c6 /sys/dev/ciss/ciss.c
parent7c8915aba7b1a5f66c9eb2d0faefe45750c41866 (diff)
downloadFreeBSD-src-d872a65707c434e00ef9c818fd11e684e0e159ba.zip
FreeBSD-src-d872a65707c434e00ef9c818fd11e684e0e159ba.tar.gz
update ciss debugger command to iterate over multiple raid controllers up to
max controllers supported PR: kern/179932 Reviewed by: Markus Gebert <markus.gebert@hostpoint.ch> MFC after: 2 weeks Sponsored by: Yahoo! Inc.
Diffstat (limited to 'sys/dev/ciss/ciss.c')
-rw-r--r--sys/dev/ciss/ciss.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c
index f9e62e4..f9f3256 100644
--- a/sys/dev/ciss/ciss.c
+++ b/sys/dev/ciss/ciss.c
@@ -4378,11 +4378,17 @@ ciss_print_adapter(struct ciss_softc *sc)
DB_COMMAND(ciss_prt, db_ciss_prt)
{
struct ciss_softc *sc;
+ devclass_t dc;
+ int maxciss, i;
- sc = devclass_get_softc(devclass_find("ciss"), 0);
- if (sc == NULL) {
- printf("no ciss controllers\n");
- } else {
+ dc = devclass_find("ciss");
+ if ( dc == NULL ) {
+ printf("%s: can't find devclass!\n", __func__);
+ return;
+ }
+ maxciss = devclass_get_maxunit(dc);
+ for (i = 0; i < maxciss; i++) {
+ sc = devclass_get_softc(dc, i);
ciss_print_adapter(sc);
}
}
OpenPOWER on IntegriCloud