Just because this is more readable.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
exit 1
}
-if grep -q "NAND simulator" /proc/mtd; then
- fatal "nandsim is already loaded"
-fi
-
-if [ "$#" -lt "1" ]; then
+usage()
+{
cat 1>&2 <<EOF
Load NAND simulator to simulate flash of a specified size.
| 1024 | 512 | 2048 |
--------------------------------------------------
EOF
+}
+
+if grep -q "NAND simulator" /proc/mtd; then
+ fatal "nandsim is already loaded"
+fi
+
+if [ "$#" -lt "1" ]; then
+ usage
exit 1
fi