summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>2018-05-01 10:58:11 +0100
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>2018-09-14 12:53:27 +0100
commit897323b234c43f658b756a71619ac441fa962a0f (patch)
tree818fd74a85aee1fb6d0d036e80f5e3732e9bd19f /scripts
parent74c3dfacc28f7560d06bfef0367787e4ea3de01f (diff)
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 <tvrtko.ursulin@intel.com> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/media-bench.pl5
1 files changed, 4 insertions, 1 deletions
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 {