From 550fe6c6fc3cfcb9ed62340492326ae86b4329de Mon Sep 17 00:00:00 2001 From: Laszlo Ast Date: Thu, 19 Nov 2009 11:07:12 +0100 Subject: [PATCH] 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 Signed-off-by: Jan Kiszka Signed-off-by: Anthony Liguori --- hw/scsi-disk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 67e3008980..642d7919ba 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -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. */