utils/trace: allow help display before sanity checks

This commit is contained in:
Philippe Gerum 2020-01-09 16:21:28 +01:00
parent 451a5ed15b
commit b2787140b4
1 changed files with 10 additions and 10 deletions

View File

@ -1,16 +1,6 @@
#! /bin/sh #! /bin/sh
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
if test \! -d $EVL_TRACEDIR; then
echo >&2 "no kernel support for tracing"
exit 2
fi
if test \! -d $EVL_TRACEDIR/events/evl; then
echo >&2 "no EVL core in kernel"
exit 2
fi
usage() { usage() {
echo >&2 "usage: $(basename $1) [-e [-s <buffer_size>]] [-d] [-p] [-f] [-h] [-c <cpu>] [-h]" echo >&2 "usage: $(basename $1) [-e [-s <buffer_size>]] [-d] [-p] [-f] [-h] [-c <cpu>] [-h]"
} }
@ -60,6 +50,16 @@ if test x$help = xtrue; then
exit 0 exit 0
fi fi
if test \! -d $EVL_TRACEDIR; then
echo >&2 "no kernel support for tracing"
exit 2
fi
if test \! -d $EVL_TRACEDIR/events/evl; then
echo >&2 "no EVL core in kernel"
exit 2
fi
cd $EVL_TRACEDIR cd $EVL_TRACEDIR
if test x$enable = xtrue; then if test x$enable = xtrue; then