From 897323b234c43f658b756a71619ac441fa962a0f Mon Sep 17 00:00:00 2001 From: Tvrtko Ursulin Date: Tue, 1 May 2018 10:58:11 +0100 Subject: media-bench: Protect against incorrect -b syntax -b is to pass the command argument directly to gem_wsim so must include another -b. Signed-off-by: Tvrtko Ursulin Acked-by: Chris Wilson --- scripts/media-bench.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/media-bench.pl b/scripts/media-bench.pl index a3619ceb..5070cae0 100755 --- a/scripts/media-bench.pl +++ b/scripts/media-bench.pl @@ -341,7 +341,10 @@ ENDHELP $verbose = 1 if defined $opts{'v'}; $gt2 = 1 if defined $opts{'2'}; $show_cmds = 1 if defined $opts{'x'}; -$balancer = $opts{'b'} if defined $opts{'b'}; +if (defined $opts{'b'}) { + die unless substr($opts{'b'}, 0, 2) eq '-b'; + $balancer = $opts{'b'}; +} if (defined $opts{'B'}) { @balancers = split /,/, $opts{'B'}; } else { -- cgit v1.2.3