From f7f72e3071d3dc28e01af74034ed28e05ef0045e Mon Sep 17 00:00:00 2001 From: Xiangfu Date: Mon, 15 Oct 2012 22:04:54 +0800 Subject: [PATCH] nanonote-files: mtd.nn: improvement on mount --- nanonote-files/base-files/usr/bin/mtd.nn | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nanonote-files/base-files/usr/bin/mtd.nn b/nanonote-files/base-files/usr/bin/mtd.nn index aa62ae7..d5c7739 100755 --- a/nanonote-files/base-files/usr/bin/mtd.nn +++ b/nanonote-files/base-files/usr/bin/mtd.nn @@ -1,6 +1,6 @@ #!/bin/sh -__VERSION__=2011-03-07 +__VERSION__=2012-10-15 if [ "$1" == "flash" ] && [ "$#" == "3" ]; then case "$2" in @@ -43,8 +43,8 @@ if [ "$1" == "mount" ] && [ "$#" == "3" ]; then exit 1 fi - ubiattach /dev/ubi_ctrl -m ${PARTITION} - DEV_UBI=`dmesg | grep "UBI: attached mtd${PARTITION} to" | cut -d ":" -f 2 | cut -d " " -f 5` + ubiattach /dev/ubi_ctrl -m ${PARTITION} > /dev/null 2>&1 + DEV_UBI=`dmesg | grep "UBI: attached mtd${PARTITION} to" | tail -n 1 | cut -d ":" -f 2 | cut -d " " -f 5` mount -t ubifs ${DEV_UBI}_0 $MOUNT_POINT exit 0 fi