summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/ic/ciss.c11
-rw-r--r--sys/dev/ic/cissvar.h3
2 files changed, 9 insertions, 5 deletions
diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c
index 9ae3404c4cd..64516a044e9 100644
--- a/sys/dev/ic/ciss.c
+++ b/sys/dev/ic/ciss.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ciss.c,v 1.15 2006/08/27 20:51:09 mickey Exp $ */
+/* $OpenBSD: ciss.c,v 1.16 2006/08/27 22:12:10 mickey Exp $ */
/*
* Copyright (c) 2005,2006 Michael Shalayeff
@@ -419,9 +419,12 @@ ciss_attach(struct ciss_softc *sc)
sc->sensors[i].status = SENSOR_S_UNKNOWN;
strlcpy(sc->sensors[i].device, sc->sc_dev.dv_xname,
sizeof(sc->sensors[i].device));
- strlcpy(sc->sensors[i].desc,
- ((struct device *)scsibus->sc_link[i][0]->device_softc)->dv_xname,
+ strlcpy(sc->sensors[i].desc, ((struct device *)
+ scsibus->sc_link[i][0]->device_softc)->dv_xname,
sizeof(sc->sensors[i].desc));
+ strlcpy(sc->sc_lds[i]->xname, ((struct device *)
+ scsibus->sc_link[i][0]->device_softc)->dv_xname,
+ sizeof(sc->sc_lds[i]->xname));
}
if (sensor_task_register(sc, ciss_sensors, 10)) {
for (i = sc->maxunits; i--; )
@@ -1051,7 +1054,7 @@ ciss_ioctl(struct device *dev, u_long cmd, caddr_t addr)
bv->bv_size = blks * (u_quad_t)letoh16(ldid->blksize);
bv->bv_level = ciss_level[ldid->type];
bv->bv_nodisk = ldp->ndrives;
- strlcpy(bv->bv_dev, ldid->label, sizeof(bv->bv_dev));
+ strlcpy(bv->bv_dev, ldp->xname, sizeof(bv->bv_dev));
strlcpy(bv->bv_vendor, "CISS", sizeof(bv->bv_vendor));
ldstat = sc->scratch;
bzero(ldstat, sizeof(*ldstat));
diff --git a/sys/dev/ic/cissvar.h b/sys/dev/ic/cissvar.h
index a838d228018..8132c45dd29 100644
--- a/sys/dev/ic/cissvar.h
+++ b/sys/dev/ic/cissvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cissvar.h,v 1.3 2006/08/27 20:51:09 mickey Exp $ */
+/* $OpenBSD: cissvar.h,v 1.4 2006/08/27 22:12:10 mickey Exp $ */
/*
* Copyright (c) 2005,2006 Michael Shalayeff
@@ -21,6 +21,7 @@ struct sensor;
struct ciss_ld {
struct ciss_blink bling; /* a copy of blink state */
+ char xname[16]; /* copy of the sdN name */
int ndrives;
u_int8_t tgts[1];
};