mirror of
https://github.com/qemu/qemu.git
synced 2024-11-26 21:33:40 +08:00
SCSI: Fix Standard INQUIRY data
Vendor identification, product identification and product revision level should be padded with spaces without a terminating NULL character, see SCSI-2 standard, 8.2.5.1 Standard INQUIRY data. Signed-off-by: Laszlo Ast <laszlo.ast@siemens-enterprise.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
a0fb002c64
commit
550fe6c6fc
@ -424,12 +424,12 @@ static int scsi_disk_emulate_inquiry(SCSIRequest *req, uint8_t *outbuf)
|
||||
if (bdrv_get_type_hint(bdrv) == BDRV_TYPE_CDROM) {
|
||||
outbuf[0] = 5;
|
||||
outbuf[1] = 0x80;
|
||||
memcpy(&outbuf[16], "QEMU CD-ROM ", 16);
|
||||
memcpy(&outbuf[16], "QEMU CD-ROM ", 16);
|
||||
} else {
|
||||
outbuf[0] = 0;
|
||||
memcpy(&outbuf[16], "QEMU HARDDISK ", 16);
|
||||
memcpy(&outbuf[16], "QEMU HARDDISK ", 16);
|
||||
}
|
||||
memcpy(&outbuf[8], "QEMU ", 8);
|
||||
memcpy(&outbuf[8], "QEMU ", 8);
|
||||
memcpy(&outbuf[32], QEMU_VERSION, 4);
|
||||
/* Identify device as SCSI-3 rev 1.
|
||||
Some later commands are also implemented. */
|
||||
|
Loading…
Reference in New Issue
Block a user