break;
default:
printf("Unsupport SCSI command 0x%02x\n", pccb->cmd[0]);
- return false;
+ return -ENOTSUPP;
}
if (ret) {
debug("SCSI command 0x%02x ret errno %d\n", pccb->cmd[0], ret);
- return false;
+ return ret;
}
- return true;
+ return 0;
}
pccb->msgout[0] = SCSI_IDENTIFY; /* NOT USED */
pccb->datalen = 8;
- if (scsi_exec(dev, pccb) != true)
+ if (scsi_exec(dev, pccb))
return 1;
*capacity = ((lbaint_t)pccb->pdata[0] << 24) |
pccb->msgout[0] = SCSI_IDENTIFY; /* NOT USED */
pccb->datalen = 16;
- if (scsi_exec(dev, pccb) != true)
+ if (scsi_exec(dev, pccb))
return 1;
*capacity = ((uint64_t)pccb->pdata[0] << 56) |
pccb->pdata = (unsigned char *)&tempbuff;
pccb->datalen = 512;
scsi_setup_inquiry(pccb);
- if (scsi_exec(dev, pccb) != true) {
+ if (scsi_exec(dev, pccb)) {
if (pccb->contr_stat == SCSI_SEL_TIME_OUT) {
/*
* selection timeout => assuming no
pccb->datalen = 0;
scsi_setup_test_unit_ready(pccb);
- if (scsi_exec(dev, pccb) != true) {
+ if (scsi_exec(dev, pccb)) {
if (dev_desc->removable) {
dev_desc->type = perq;
goto removable;