bool SCSI_HDD::read_buffer(int length)
{
+ if(!(command[0] == SCSI_CMD_READ6 || command[0] == SCSI_CMD_READ10 || command[0] == SCSI_CMD_READ12)) {
+ for(int i = 0; i < length; i++) {
+ buffer->write(0);
+ position++;
+ }
+ set_sense_code(SCSI_SENSE_NOSENSE);
+ return true;
+ }
HARDDISK *unit = disk[get_logical_unit_number()];
if(!(unit != NULL && unit->mounted())) {
bool SCSI_HDD::write_buffer(int length)
{
+ if(!(command[0] == SCSI_CMD_WRITE6 || command[0] == SCSI_CMD_WRITE10 || command[0] == SCSI_CMD_WRITE12)) {
+ for(int i = 0; i < length; i++) {
+ buffer->read();
+ position++;
+ }
+ set_sense_code(SCSI_SENSE_NOSENSE);
+ return true;
+ }
HARDDISK *unit = disk[get_logical_unit_number()];
if(!(unit != NULL && unit->mounted())) {
}
}
*/
- state_fio->StateBuffer(image_path, sizeof(image_path), 1);
-// state_fio->StateBuffer(sector_size, sizeof(sector_size), 1);
- for(int i = 0; i < (sizeof(sector_size) / sizeof(int)); i++) {
- state_fio->StateInt32(sector_size[i]);
- }
+ state_fio->StateArray(&image_path[0][0], sizeof(image_path), 1);
+ state_fio->StateArray(sector_size, sizeof(sector_size), 1);
return SCSI_DEV::process_state(state_fio, loading);
}