lkml.org 
[lkml]   [2019]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/3] leaking_addresses: Expand tilde in output file name
Date
Currently if user passes an output file to the script via
--output-raw we do not handle expansion of tilde.

Use perl function glob() to expand tilde in output file name.

Signed-off-by: Tobin C. Harding <tobin@kernel.org>
---
scripts/leaking_addresses.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/leaking_addresses.pl b/scripts/leaking_addresses.pl
index ef9e5b2a1614..ce545ca3fb70 100755
--- a/scripts/leaking_addresses.pl
+++ b/scripts/leaking_addresses.pl
@@ -150,7 +150,7 @@ if (!(is_supported_architecture() or $opt_32bit or $page_offset_32bit)) {
}

if ($output_raw) {
- open my $fh, '>', $output_raw or die "$0: $output_raw: $!\n";
+ open my $fh, '>', glob($output_raw) or die "$0: $output_raw: $!\n";
select $fh;
}

--
2.20.1
\
 
 \ /
  Last update: 2019-02-07 23:51    [W:0.136 / U:1.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site