aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xload_nandsim.sh13
1 files changed, 1 insertions, 12 deletions
diff --git a/load_nandsim.sh b/load_nandsim.sh
index bda3c79..18f788e 100755
--- a/load_nandsim.sh
+++ b/load_nandsim.sh
@@ -7,18 +7,7 @@
# Author: Artem Bityutskiy
#
-# Check if nandsim module is loaded
-function nandsim_loaded()
-{
- local NANDSIM=`lsmod | grep nandsim`
- if [ -n "$NANDSIM" ]; then
- return 1
- fi
- return 0
-}
-
-nandsim_loaded
-if (( $? != 0 )); then
+if grep -q "NAND simulator" /proc/mtd; then
echo "Error: nandsim is already loaded"
exit 1
fi