summaryrefslogtreecommitdiff
path: root/src/hvinfo.adb
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/hvinfo.adb
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/hvinfo.adb')
-rw-r--r--src/hvinfo.adb9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/hvinfo.adb b/src/hvinfo.adb
index e87507e..7825210 100644
--- a/src/hvinfo.adb
+++ b/src/hvinfo.adb
@@ -3,11 +3,14 @@ with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Text_IO; use Ada.Text_IO;
with Hypervisor_Check; use Hypervisor_Check;
-
procedure HVInfo is
begin
- Put_Line (To_String (Get_Vendor_String));
-
+ -- Try CPUID checks first
+ if Hypervisor_Present then
+ Put_Line (To_String (Get_Vendor_Name));
+ else
+ null;
+ end if;
end HVInfo;