diff --git a/pafish/qemu.c b/pafish/qemu.c index 9367612..ec96efc 100644 --- a/pafish/qemu.c +++ b/pafish/qemu.c @@ -5,6 +5,7 @@ #include "qemu.h" #include "types.h" #include "utils.h" +#include "cpu.h" int qemu_reg_key1() { return pafish_exists_regkey_value_str(HKEY_LOCAL_MACHINE, "HARDWARE\\DEVICEMAP\\Scsi\\Scsi Port 0\\Scsi Bus 0\\Target Id 0\\Logical Unit Id 0", "Identifier", "QEMU"); @@ -14,3 +15,9 @@ int qemu_reg_key2() { return pafish_exists_regkey_value_str(HKEY_LOCAL_MACHINE, "HARDWARE\\Description\\System", "SystemBiosVersion", "QEMU"); } +int qemu_cpu_name() { + char cpu_brand[49]; + cpu_write_brand(cpu_brand); + return !memcmp(cpu_brand, "QEMU Virtual CPU", 16) ? TRUE : FALSE; +} + diff --git a/pafish/qemu.h b/pafish/qemu.h index 53ee250..4b24e33 100644 --- a/pafish/qemu.h +++ b/pafish/qemu.h @@ -6,4 +6,6 @@ int qemu_reg_key1(); int qemu_reg_key2(); +int qemu_cpu_name(); + #endif