summaryrefslogtreecommitdiffstats
path: root/sys/dev/ciss/ciss.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ciss/ciss.c')
-rw-r--r--sys/dev/ciss/ciss.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c
index ec8b622..c20ee6b 100644
--- a/sys/dev/ciss/ciss.c
+++ b/sys/dev/ciss/ciss.c
@@ -1922,7 +1922,7 @@ ciss_user_command(struct ciss_softc *sc, IOCTL_Command_struct *ioc)
struct ciss_request *cr;
struct ciss_command *cc;
struct ciss_error_info *ce;
- int error;
+ int error = 0;
debug_called(1);
@@ -1967,9 +1967,17 @@ ciss_user_command(struct ciss_softc *sc, IOCTL_Command_struct *ioc)
}
/*
- * Copy the results back to the user.
+ * Check to see if the command succeeded.
*/
ce = (struct ciss_error_info *)&(cc->sg[0]);
+ if (ciss_report_request(cr, NULL, NULL) == 0)
+ bzero(ce, sizeof(*ce));
+ else
+ error = EIO;
+
+ /*
+ * Copy the results back to the user.
+ */
bcopy(ce, &ioc->error_info, sizeof(*ce));
if ((ioc->buf_size > 0) &&
(error = copyout(cr->cr_data, ioc->buf, ioc->buf_size))) {
OpenPOWER on IntegriCloud