diff options
-rw-r--r-- | src/config.ads | 5 | ||||
-rw-r--r-- | src/hvinfo.adb | 1 | ||||
-rw-r--r-- | src/hypervisor_check.adb | 9 | ||||
-rw-r--r-- | src/hypervisor_check.ads | 2 |
4 files changed, 14 insertions, 3 deletions
diff --git a/src/config.ads b/src/config.ads new file mode 100644 index 0000000..ddc59a1 --- /dev/null +++ b/src/config.ads @@ -0,0 +1,5 @@ +package Config is + -- In the future this should be autogenerated + + Linux : constant Boolean := True; +end Config; diff --git a/src/hvinfo.adb b/src/hvinfo.adb index 06fe9f1..2d97d60 100644 --- a/src/hvinfo.adb +++ b/src/hvinfo.adb @@ -7,6 +7,7 @@ with GNAT.Strings; with Hypervisor_Check; use Hypervisor_Check; with HVInfo_Util; use HVInfo_Util; +with Config; procedure HVInfo is package US renames Ada.Strings.Unbounded; diff --git a/src/hypervisor_check.adb b/src/hypervisor_check.adb index 83bb107..64964d8 100644 --- a/src/hypervisor_check.adb +++ b/src/hypervisor_check.adb @@ -99,10 +99,13 @@ package body Hypervisor_Check is function Get_DMI_Vendor_String return US.Unbounded_String is Name : US.Unbounded_String; begin - -- Linux - Name := Head_Of_File (Linux_Sys_Vendor_File); - return Name; + if Config.Linux then + Name := Head_Of_File (Linux_Sys_Vendor_File); + else + Name := US.To_Unbounded_String(""); + end if; + return Name; end Get_DMI_Vendor_String; function Get_DMI_Vendor_Name return US.Unbounded_String is diff --git a/src/hypervisor_check.ads b/src/hypervisor_check.ads index 1468695..1118fd4 100644 --- a/src/hypervisor_check.ads +++ b/src/hypervisor_check.ads @@ -4,6 +4,8 @@ with Ada.Strings.Unbounded; with Ada.Text_IO; with Ada.Text_IO.Unbounded_IO; +with Config; + package Hypervisor_Check is package IO renames Ada.Text_IO; |