mirror of
https://github.com/a0rtega/pafish
synced 2024-11-22 06:11:18 +03:00
Add new qemu detection based on CPU brand string
This commit is contained in:
parent
94dca540db
commit
c65cfb5adc
@ -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;
|
||||
}
|
||||
|
||||
|
@ -6,4 +6,6 @@ int qemu_reg_key1();
|
||||
|
||||
int qemu_reg_key2();
|
||||
|
||||
int qemu_cpu_name();
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user