Skip to content

Commit

Permalink
Fix READ FORMAT CAPACITIES for SCSI disks
Browse files Browse the repository at this point in the history
  • Loading branch information
Cacodemon345 committed Dec 17, 2024
1 parent 3be4129 commit a15e968
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/scsi/scsi_disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1297,8 +1297,13 @@ scsi_disk_command(scsi_common_t *sc, uint8_t *cdb)
dev->packet_status = PHASE_COMPLETE;
dev->callback = 20.0 * SCSI_TIME;
break;
} else if (max_len < 12) {
scsi_disk_data_phase_error(dev);
return;
}

scsi_disk_buf_alloc(dev, 256);

max_len = hdd_image_get_last_sector(dev->id);
memset(dev->temp_buffer, 0, 12);

Expand Down

0 comments on commit a15e968

Please sign in to comment.