mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
scsi-disk: add FORMAT UNIT command
When initialising a drive ready to install MacOS, Apple HD SC Setup first attempts to format the drive. Add a simple FORMAT UNIT command which simply returns success to allow the format to succeed. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220622105314.802852-9-mark.cave-ayland@ilande.co.uk> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
d9a107d153
commit
6ab717610f
2 changed files with 5 additions and 0 deletions
|
@ -2180,6 +2180,9 @@ static int32_t scsi_disk_emulate_command(SCSIRequest *req, uint8_t *buf)
|
|||
trace_scsi_disk_emulate_command_WRITE_SAME(
|
||||
req->cmd.buf[0] == WRITE_SAME_10 ? 10 : 16, r->req.cmd.xfer);
|
||||
break;
|
||||
case FORMAT_UNIT:
|
||||
trace_scsi_disk_emulate_command_FORMAT_UNIT(r->req.cmd.xfer);
|
||||
break;
|
||||
default:
|
||||
trace_scsi_disk_emulate_command_UNKNOWN(buf[0],
|
||||
scsi_command_name(buf[0]));
|
||||
|
@ -2585,6 +2588,7 @@ static const SCSIReqOps *const scsi_disk_reqops_dispatch[256] = {
|
|||
[VERIFY_10] = &scsi_disk_emulate_reqops,
|
||||
[VERIFY_12] = &scsi_disk_emulate_reqops,
|
||||
[VERIFY_16] = &scsi_disk_emulate_reqops,
|
||||
[FORMAT_UNIT] = &scsi_disk_emulate_reqops,
|
||||
|
||||
[READ_6] = &scsi_disk_dma_reqops,
|
||||
[READ_10] = &scsi_disk_dma_reqops,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue