]> www.infradead.org Git - users/sagi/blktests.git/commitdiff
common/rc: Fix _have_tracepoint()
authorBart Van Assche <bart.vanassche@wdc.com>
Tue, 19 Jun 2018 20:23:45 +0000 (13:23 -0700)
committerOmar Sandoval <osandov@fb.com>
Mon, 25 Jun 2018 19:13:13 +0000 (12:13 -0700)
Make sure that _have_tracepoint() uses the argument passed to that
function instead of using an undefined variable.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
common/rc

index 7f172802536449236231fb5412617d8d42f94e3b..7592400dda82e3ada8529ba0c667b2eeab4d2c60 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -112,6 +112,8 @@ _have_tracefs() {
 }
 
 _have_tracepoint() {
+       local event=$1
+
        if [[ ! -d /sys/kernel/debug/tracing/events/${event} ]]; then
                SKIP_REASON="tracepoint ${event} does not exist"
                return 1