PKGBUILDs/extra/archboot/vmware-detect.c

14 lines
162 B
C
Raw Normal View History

2009-10-10 02:23:22 +00:00
#include <stdio.h>
int main() {
unsigned char idtr[6];
asm("sidt %0" : "=m" (idtr));
if(0xff==idtr[5])
{
return 0;
}
else
{
return 1;
}
}