]> www.infradead.org Git - mtd-utils.git/commitdiff
load_nandsim: switch to sh
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Fri, 3 Aug 2012 07:35:36 +0000 (10:35 +0300)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Fri, 3 Aug 2012 07:35:36 +0000 (10:35 +0300)
We do not use bashizms any longer, so we can switch to 'sh'. Also, use
strict sh options.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
load_nandsim.sh

index 1bb31e1ce521cbce5b4d53b4d8abcf85d1cbaaac..4d9f0cbf20bb5185719f4d7306adb651d3ee5468 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh -euf
 
 #
 # This script inserts NAND simulator module to emulate NAND flash of specified
@@ -123,8 +123,5 @@ second="second_id_byte=$second"
 [ -z "$fourth" ] || fourth="fourth_id_byte=$fourth"
 
 modprobe nandsim "$first" "$second" $third $fourth
-if [ "$?" != "0" ]; then
-       fatal "Error: cannot load nandsim"
-fi
 
 echo "Loaded NAND simulator (${size}MiB, ${eb_size}KiB eraseblock, $page_size bytes NAND page)"