1
0
mirror of git://projects.qi-hardware.com/nn-usb-fpga.git synced 2024-12-05 04:31:52 +02: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:
Xiangfu Liu 2010-08-29 11:41:20 +08:00
parent b672b6c8ff
commit b6f32d536f

View File

@ -1,4 +1,10 @@
#!/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
echo "there is a memory card present"
@ -7,6 +13,7 @@ else
exit 1
fi
#make multi-layer directory
mkdir -p /tmp/card
echo "try to mount mmc card"
@ -14,7 +21,7 @@ mount /dev/mmcblk0p1 /tmp/card/
if [ $? == 0 ] ; then
echo "mount ok"
else
echo "ERROR - can not mount memory card"
echo "ERROR - can not do a real mount on memory card"
exit 1
fi
@ -23,11 +30,12 @@ dd if=/dev/zero of=/tmp/card/testfile bs=1024 count=3096
if [ $? == 0 ] ; then
echo "mount ok"
else
echo "ERROR - can not mount memory card"
echo "ERROR - can not do a real test for mounting memory card"
exit 1
fi
rm -rf /tmp/card/testfile
umount /tmp/card
echo "test done"
echo "test done"