mirror of
git://projects.qi-hardware.com/nn-usb-fpga.git
synced 2025-04-21 12:27:27 +03:00
test-memory-card.sh: cleanup the output message, modify by Adam
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
This commit is contained in:
14
binaries/sie_rootfs_files/root/binaries/test-memory-card.sh
Executable file → Normal file
14
binaries/sie_rootfs_files/root/binaries/test-memory-card.sh
Executable file → Normal file
@@ -1,4 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# Program:
|
||||||
|
# Program trys firstly to detect if uSD card inserted and then
|
||||||
|
# mount data
|
||||||
|
# History:
|
||||||
|
# Author:
|
||||||
|
# 2010-08-19 XiangFu Liu, xiangfu@sharism.cc
|
||||||
|
|
||||||
if [ -b "/dev/mmcblk0" ] ; then
|
if [ -b "/dev/mmcblk0" ] ; then
|
||||||
echo "there is a memory card present"
|
echo "there is a memory card present"
|
||||||
@@ -7,6 +13,7 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#make multi-layer directory
|
||||||
mkdir -p /tmp/card
|
mkdir -p /tmp/card
|
||||||
|
|
||||||
echo "try to mount mmc card"
|
echo "try to mount mmc card"
|
||||||
@@ -14,7 +21,7 @@ mount /dev/mmcblk0p1 /tmp/card/
|
|||||||
if [ $? == 0 ] ; then
|
if [ $? == 0 ] ; then
|
||||||
echo "mount ok"
|
echo "mount ok"
|
||||||
else
|
else
|
||||||
echo "ERROR - can not mount memory card"
|
echo "ERROR - can not do a real mount on memory card"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -23,11 +30,12 @@ dd if=/dev/zero of=/tmp/card/testfile bs=1024 count=3096
|
|||||||
if [ $? == 0 ] ; then
|
if [ $? == 0 ] ; then
|
||||||
echo "mount ok"
|
echo "mount ok"
|
||||||
else
|
else
|
||||||
echo "ERROR - can not mount memory card"
|
echo "ERROR - can not do a real test for mounting memory card"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf /tmp/card/testfile
|
rm -rf /tmp/card/testfile
|
||||||
umount /tmp/card
|
umount /tmp/card
|
||||||
echo "test done"
|
echo "test done"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user