diff options
author | root <root@rshg054.dnsready.net> | 2011-08-02 04:35:55 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2011-08-02 04:35:55 +0000 |
commit | bf35116f9d203dcafce808a6c7b3dd5a0db8afbc (patch) | |
tree | f9551a1d3c67d2113cc5fc5c3f8816bcbaad0540 /testing/archboot/vmware-detect.c | |
parent | 1173ff2dba7d0fd3c45f170a5e353a76b7a5da2f (diff) |
Tue Aug 2 04:35:55 UTC 2011
Diffstat (limited to 'testing/archboot/vmware-detect.c')
-rw-r--r-- | testing/archboot/vmware-detect.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/testing/archboot/vmware-detect.c b/testing/archboot/vmware-detect.c new file mode 100644 index 000000000..d242a388d --- /dev/null +++ b/testing/archboot/vmware-detect.c @@ -0,0 +1,13 @@ +#include <stdio.h> +int main() { + unsigned char idtr[6]; + asm("sidt %0" : "=m" (idtr)); + if(0xff==idtr[5]) + { + return 0; + } + else + { + return 1; + } +} |