if (ret < 0)
return ret;
+ __io_u = hdr->usr_ptr;
+
/* record if an io error occurred */
if (hdr->info & SG_INFO_CHECK)
- io_u->error = EIO;
+ __io_u->error = EIO;
- __io_u = hdr->usr_ptr;
if (__io_u == io_u)
break;
}
if (!(hdr->info & SG_INFO_CHECK) && !strlen(msg))
- strncpy(msg, "SG Driver did not report a Host, Driver or Device check",
- MAXERRDETAIL - 1);
+ snprintf(msg, MAXERRDETAIL, "%s",
+ "SG Driver did not report a Host, Driver or Device check");
return msg;
}