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:
parent
b672b6c8ff
commit
b6f32d536f
16
binaries/sie_rootfs_files/root/binaries/test-memory-card.sh
Executable file → Normal file
16
binaries/sie_rootfs_files/root/binaries/test-memory-card.sh
Executable file → Normal 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"
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user