From: Artem Bityutskiy Date: Fri, 3 Aug 2012 07:19:07 +0000 (+0300) Subject: load_nandsim.sh: introduce a separate usage function X-Git-Tag: v1.5.1~61 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6837ec6fe9b9d915c7bc6605e2ae252ffc1a3316;p=mtd-utils.git load_nandsim.sh: introduce a separate usage function Just because this is more readable. Signed-off-by: Artem Bityutskiy --- 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 <