]> xenbits.xensource.com Git - seabios.git/commitdiff
tweak coreboot qemu detection
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 13 Jun 2013 05:42:58 +0000 (07:42 +0200)
committerKevin O'Connor <kevin@koconnor.net>
Fri, 14 Jun 2013 00:50:15 +0000 (20:50 -0400)
I have patches for coreboot in the queue adding q35 support there,
which will change the mainboard names (adding the detected chipset).
Make SeaBIOS check the mainboard name starts with "QEMU" instead of
doing a full string match to handle this.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
src/coreboot.c

index 2c8bd2d4f58584c41a32f96fd684da793bdcc17d..6ad4cfc98801e677a9a1d8f1c7af80873802f9f8 100644 (file)
@@ -167,7 +167,7 @@ coreboot_preinit(void)
         CBvendor = &cbmb->strings[cbmb->vendor_idx];
         CBpart = &cbmb->strings[cbmb->part_idx];
         if (strcmp(CBvendor, "Emulation") == 0 &&
-            strcmp(CBpart, "QEMU x86") == 0) {
+            memcmp(CBpart, "QEMU", 4) == 0) {
             PlatformRunningOn |= PF_QEMU;
         }
         dprintf(1, "Found mainboard %s %s\n", CBvendor, CBpart);