From 6837ec6fe9b9d915c7bc6605e2ae252ffc1a3316 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Fri, 3 Aug 2012 10:19:07 +0300 Subject: load_nandsim.sh: introduce a separate usage function Just because this is more readable. Signed-off-by: Artem Bityutskiy --- load_nandsim.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/load_nandsim.sh b/load_nandsim.sh index 87d4f60..1df3813 100755 --- a/load_nandsim.sh +++ b/load_nandsim.sh @@ -13,11 +13,8 @@ fatal() exit 1 } -if grep -q "NAND simulator" /proc/mtd; then - fatal "nandsim is already loaded" -fi - -if [ "$#" -lt "1" ]; then +usage() +{ cat 1>&2 <