summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/hypervisor_check.adb6
-rw-r--r--src/hypervisor_check.ads2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/hypervisor_check.adb b/src/hypervisor_check.adb
index 076348b..9923d27 100644
--- a/src/hypervisor_check.adb
+++ b/src/hypervisor_check.adb
@@ -85,7 +85,7 @@ package body Hypervisor_Check is
return False;
end if;
elsif Config.FreeBSD then
- return Command_Succeeds (Interfaces.C.To_C (FreeBSD_Xen_Present_Command));
+ return Command_Succeeds (FreeBSD_Xen_Present_Command);
else
raise OS_Not_Supported;
end if;
@@ -105,14 +105,14 @@ package body Hypervisor_Check is
-- Execute a system command and return true if it succeeded
-- (i.e. returned 0)
- function Command_Succeeds (Command : Interfaces.C.Char_Array) return Boolean is
+ function Command_Succeeds (Command : String) return Boolean is
use Interfaces.C;
function Sys (Arg : Char_Array) return Integer;
pragma Import (C, Sys, "system");
Ret_Val : Integer;
begin
- Ret_Val := Sys (Command);
+ Ret_Val := Sys (Interfaces.C.To_C (Command));
if Ret_Val > 0 then
return False;
else
diff --git a/src/hypervisor_check.ads b/src/hypervisor_check.ads
index ced2309..3bb84be 100644
--- a/src/hypervisor_check.ads
+++ b/src/hypervisor_check.ads
@@ -49,7 +49,7 @@ package Hypervisor_Check is
function Get_DMI_Vendor_String return US.Unbounded_String;
- function Command_Succeeds (Command : Interfaces.C.Char_Array) return Boolean;
+ function Command_Succeeds (Command : String) return Boolean;
function VirtualBox_PCI_Present return Boolean;