From: Paolo Bonzini Date: Thu, 2 Aug 2012 16:22:44 +0000 (+0200) Subject: scsi: fix detection of QEMU X-Git-Tag: rel-1.7.1~2 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5a023065388287e261ae9212452ff541f9fa9cd3;p=seabios.git scsi: fix detection of QEMU The vendor string is null-terminated by the time scsi_init_drive looks at it, so it is incorrect to pad the memcmp argument with spaces. Signed-off-by: Paolo Bonzini --- diff --git a/src/blockcmd.c b/src/blockcmd.c index 95406c6..4365650 100644 --- a/src/blockcmd.c +++ b/src/blockcmd.c @@ -158,7 +158,7 @@ scsi_init_drive(struct drive_s *drive, const char *s, int prio) // but some old USB keys only support a very small subset of SCSI which // does not even include the MODE SENSE command! // - if (! CONFIG_COREBOOT && memcmp(vendor, "QEMU ", 8) == 0) { + if (! CONFIG_COREBOOT && memcmp(vendor, "QEMU", 5) == 0) { struct cdbres_mode_sense_geom geomdata; ret = cdb_mode_sense_geom(&dop, &geomdata); if (ret == 0) {