summaryrefslogtreecommitdiff
path: root/src/hypervisor_check.ads
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2015-03-05 17:37:00 +0600
committerDaniil Baturin <daniil@baturin.org>2015-03-05 17:37:00 +0600
commit3a79fd6be852275c052deb97c8dd67abbb7a2545 (patch)
tree5d984d93c27301283e0794ea7d5ecb7277cc5b27 /src/hypervisor_check.ads
parenta9ec68e3afbc971f3d0d68f3064a395ab9c135a6 (diff)
downloadhvinfo-3a79fd6be852275c052deb97c8dd67abbb7a2545.tar.gz
hvinfo-3a79fd6be852275c052deb97c8dd67abbb7a2545.zip
Add a function that maps vendor strings to names.
Also, don't overuse global use clauses.
Diffstat (limited to 'src/hypervisor_check.ads')
-rw-r--r--src/hypervisor_check.ads11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/hypervisor_check.ads b/src/hypervisor_check.ads
index e69f9f5..dea832e 100644
--- a/src/hypervisor_check.ads
+++ b/src/hypervisor_check.ads
@@ -1,18 +1,23 @@
with Interfaces; use Interfaces;
with System.Machine_Code; use System.Machine_Code;
-with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
+--with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
+with Ada.Strings.Unbounded;
package Hypervisor_Check is
+ package US renames Ada.Strings.Unbounded;
+
Hypervisor_Leaf : constant := 16#40000000#;
type CPUID_Registers is array (1 .. 4) of Unsigned_32;
function CPUID (Arg : Unsigned_32) return CPUID_Registers;
- function String_of_U32 (Arg : Unsigned_32) return Unbounded_String;
+ function String_of_U32 (Arg : Unsigned_32) return US.Unbounded_String;
function Hypervisor_Present return Boolean;
- function Get_Vendor_String return Unbounded_String;
+ function Get_Vendor_String return US.Unbounded_String;
+
+ function Get_Vendor_Name return US.Unbounded_String;
end Hypervisor_Check;