diff options
-rw-r--r-- | src/hypervisor_check.adb | 13 | ||||
-rw-r--r-- | src/hypervisor_check.ads | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/hypervisor_check.adb b/src/hypervisor_check.adb index a8bf9a6..113f5f3 100644 --- a/src/hypervisor_check.adb +++ b/src/hypervisor_check.adb @@ -96,6 +96,19 @@ package body Hypervisor_Check is return Vendor_Name; end Get_Vendor_Name; + function DMI_Available return Boolean is + begin + if Config.Linux then + if Directories.Exists("/sys/class/dmi") then + return True; + else + return False; + end if; + else + raise OS_Not_Supported; + end if; + end DMI_Available; + function Get_DMI_Vendor_String return US.Unbounded_String is Name : US.Unbounded_String; begin diff --git a/src/hypervisor_check.ads b/src/hypervisor_check.ads index ebb16cc..86ca5a2 100644 --- a/src/hypervisor_check.ads +++ b/src/hypervisor_check.ads @@ -18,6 +18,8 @@ package Hypervisor_Check is function Hypervisor_Present return Boolean; + function DMI_Available return Boolean; + function Get_DMI_Vendor_Name return US.Unbounded_String; private |