summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2015-04-04 16:06:18 +0600
committerDaniil Baturin <daniil@baturin.org>2015-04-04 16:06:18 +0600
commitc7653cc0c52a7fe30ab95a98a2e750e535c7e1c9 (patch)
treeb10f23d4312e7882753eca1e865acea1980f542f
parent518fd7a8eaf62befa3f03809a19b3855ad37e3b4 (diff)
downloadhvinfo-c7653cc0c52a7fe30ab95a98a2e750e535c7e1c9.tar.gz
hvinfo-c7653cc0c52a7fe30ab95a98a2e750e535c7e1c9.zip
Raise OS_Not_Supported when something is not implemented on this OS.
-rw-r--r--src/hypervisor_check.adb2
-rw-r--r--src/hypervisor_check.ads2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/hypervisor_check.adb b/src/hypervisor_check.adb
index 64964d8..a8bf9a6 100644
--- a/src/hypervisor_check.adb
+++ b/src/hypervisor_check.adb
@@ -102,7 +102,7 @@ package body Hypervisor_Check is
if Config.Linux then
Name := Head_Of_File (Linux_Sys_Vendor_File);
else
- Name := US.To_Unbounded_String("");
+ raise OS_Not_Supported;
end if;
return Name;
diff --git a/src/hypervisor_check.ads b/src/hypervisor_check.ads
index 1118fd4..ebb16cc 100644
--- a/src/hypervisor_check.ads
+++ b/src/hypervisor_check.ads
@@ -12,6 +12,8 @@ package Hypervisor_Check is
package US renames Ada.Strings.Unbounded;
package UIO renames Ada.Text_IO.Unbounded_IO;
+ OS_Not_Supported : exception;
+
function Get_Vendor_Name return US.Unbounded_String;
function Hypervisor_Present return Boolean;