diff options
author | msmith <msmith@FreeBSD.org> | 1999-11-02 03:24:09 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 1999-11-02 03:24:09 +0000 |
commit | 0581a055e6545d6be327ec8a349e5af82beba6aa (patch) | |
tree | 4833288d6bd891b7988134d0a860632ee9a162fd /sys/dev/amr/amr_disk.c | |
parent | c4b43b216f2f130fdc58a759240356f18083f002 (diff) | |
download | FreeBSD-src-0581a055e6545d6be327ec8a349e5af82beba6aa.zip FreeBSD-src-0581a055e6545d6be327ec8a349e5af82beba6aa.tar.gz |
Don't print the chipset value; it's not useful.
Now we know what some of the state values are, print the current array
state.
Diffstat (limited to 'sys/dev/amr/amr_disk.c')
-rw-r--r-- | sys/dev/amr/amr_disk.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/sys/dev/amr/amr_disk.c b/sys/dev/amr/amr_disk.c index 7b66f4f..54d1213 100644 --- a/sys/dev/amr/amr_disk.c +++ b/sys/dev/amr/amr_disk.c @@ -255,6 +255,7 @@ amrd_attach(device_t dev) { struct amrd_softc *sc = (struct amrd_softc *)device_get_softc(dev); device_t parent; + char *state; debug("called"); @@ -264,9 +265,26 @@ amrd_attach(device_t dev) sc->amrd_drive = device_get_ivars(dev); sc->amrd_dev = dev; - device_printf(dev, "%uMB (%u sectors), state 0x%x properties 0x%x\n", + switch(sc->amrd_drive->al_state) { + case AMRD_OFFLINE: + state = "offline"; + break; + case AMRD_DEGRADED: + state = "degraded"; + break; + case AMRD_OPTIMAL: + state = "optimal"; + break; + case AMRD_DELETED: + state = "deleted"; + break; + default: + state = "unknown state"; + } + + device_printf(dev, "%uMB (%u sectors) RAID %d (%s)\n", sc->amrd_drive->al_size / ((1024 * 1024) / AMR_BLKSIZE), - sc->amrd_drive->al_size, sc->amrd_drive->al_state, sc->amrd_drive->al_properties); + sc->amrd_drive->al_size, sc->amrd_drive->al_properties & 0xf, state); devstat_add_entry(&sc->amrd_stats, "amrd", sc->amrd_unit, AMR_BLKSIZE, DEVSTAT_NO_ORDERED_TAGS, |