From 555ca584a791b9d3eacaf3d1a97bb1bc8517696f Mon Sep 17 00:00:00 2001 From: axis Date: Mon, 1 Mar 2010 10:52:37 +0100 Subject: Made redirection to /dev/null cross platform. --- bin/patch_capabilities.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl index d3013f6..4390957 100755 --- a/bin/patch_capabilities.pl +++ b/bin/patch_capabilities.pl @@ -65,6 +65,9 @@ sub trim($) { return $string; } +my $nullDevice = "/dev/null"; +$nullDevice = "NUL" if ($^O =~ /MSWin/); + my @capabilitiesToAllow = ("LocalServices", "NetworkServices", "ReadUserData", "UserEnvironment", "WriteUserData"); my @capabilitiesSpecified = (); @@ -246,7 +249,7 @@ if (@ARGV) # Actually execute the elftran command to set the capabilities. print ("Executing ".$commandToExecute."\n"); - system ($commandToExecute." > NUL"); + system ($commandToExecute." > $nullDevice"); ## Create another command line to check that the set capabilities are correct. #$commandToExecute = "elftran -dump s ".$binaryPath; -- cgit v0.12