summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hypervisor_check.adb5
-rw-r--r--src/hypervisor_check.ads10
2 files changed, 8 insertions, 7 deletions
diff --git a/src/hypervisor_check.adb b/src/hypervisor_check.adb
index b92f7d9..d939cd9 100644
--- a/src/hypervisor_check.adb
+++ b/src/hypervisor_check.adb
@@ -54,8 +54,8 @@ package body Hypervisor_Check is
use US;
Vendor_String, Vendor_Name : Unbounded_String;
begin
- Vendor_String := Get_Vendor_String;
- if Vendor_String = "KVMKVMKVM" then
+ Vendor_String := Get_Vendor_String;
+ if Vendor_String = "KVMKVMKVM" then
Vendor_Name := To_Unbounded_String ("KVM");
elsif Vendor_String = "XenVMMXenVMM" then
Vendor_Name := To_Unbounded_String ("Xen");
@@ -69,5 +69,4 @@ package body Hypervisor_Check is
return Vendor_Name;
end Get_Vendor_Name;
-
end Hypervisor_Check;
diff --git a/src/hypervisor_check.ads b/src/hypervisor_check.ads
index dea832e..11d638d 100644
--- a/src/hypervisor_check.ads
+++ b/src/hypervisor_check.ads
@@ -7,6 +7,12 @@ package Hypervisor_Check is
package US renames Ada.Strings.Unbounded;
+ function Get_Vendor_Name return US.Unbounded_String;
+
+ function Hypervisor_Present return Boolean;
+
+private
+
Hypervisor_Leaf : constant := 16#40000000#;
type CPUID_Registers is array (1 .. 4) of Unsigned_32;
@@ -14,10 +20,6 @@ package Hypervisor_Check is
function String_of_U32 (Arg : Unsigned_32) return US.Unbounded_String;
- function Hypervisor_Present return Boolean;
-
function Get_Vendor_String return US.Unbounded_String;
- function Get_Vendor_Name return US.Unbounded_String;
-
end Hypervisor_Check;