summaryrefslogtreecommitdiff
path: root/packages/sharp-binary-only/sharp-sdmmc-support-2.4.18-rmk7-pxa3-embedix/sdcontrol
diff options
context:
space:
mode:
authornslu2-linux.adm@bkbits.net <nslu2-linux.adm@bkbits.net>2005-05-09 14:40:04 +0000
committernslu2-linux.adm@bkbits.net <nslu2-linux.adm@bkbits.net>2005-05-09 14:40:04 +0000
commit6322a20675851b5ff9dd01b02a50588a8f7a37f1 (patch)
tree6496d22780a13384f48b5cf86fbc8537745b8df1 /packages/sharp-binary-only/sharp-sdmmc-support-2.4.18-rmk7-pxa3-embedix/sdcontrol
parenta432a3ccbfffcfd5906a3353948c81ba314e92d0 (diff)
Merge bk://oe-devel.bkbits.net/openembedded
into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/05/09 16:38:35+02:00 handhelds.org!CoreDump sdcontrol: some cleanups BKrev: 427f76445aiW91-JnTrPB66b7DUuQg
Diffstat (limited to 'packages/sharp-binary-only/sharp-sdmmc-support-2.4.18-rmk7-pxa3-embedix/sdcontrol')
-rw-r--r--packages/sharp-binary-only/sharp-sdmmc-support-2.4.18-rmk7-pxa3-embedix/sdcontrol58
1 files changed, 29 insertions, 29 deletions
diff --git a/packages/sharp-binary-only/sharp-sdmmc-support-2.4.18-rmk7-pxa3-embedix/sdcontrol b/packages/sharp-binary-only/sharp-sdmmc-support-2.4.18-rmk7-pxa3-embedix/sdcontrol
index a857817bbc..63e5256f3d 100644
--- a/packages/sharp-binary-only/sharp-sdmmc-support-2.4.18-rmk7-pxa3-embedix/sdcontrol
+++ b/packages/sharp-binary-only/sharp-sdmmc-support-2.4.18-rmk7-pxa3-embedix/sdcontrol
@@ -64,27 +64,31 @@ wait_release()
kill_task()
{
- ps_line=`ps ax | grep 'qpe$'` # no -w on busybox
- qpe_pid=`get_pid $ps_line`
- #echo qpe_pid = $qpe_pid >> /tmp/sd
- target_pids=`fuser -m $DEVICE | cut -d : -f2`
- #echo $target_pids >> /tmp/sd
- if [ "$target_pids" = "" ]; then
- return
- fi
- is_exist_qpe=`echo $target_pids | grep $qpe_pid` # no -w on busybox
- if [ "$is_exist_qpe" = "" ]; then
- kill -9 $target_pids
- #echo kill -9 $target_pids >> /tmp/sd
- else
- #echo "found qpe!!!" >> /tmp/sd
- target_pids=`echo $target_pids | sed -e "s/$qpe_pid//"`
- if [ "$target_pids" != "" ]; then
- kill -9 $target_pids
- #echo kill -9 $target_pids >> /tmp/sd
- fi
- wait_release
- exit 0
+
+ if ! test -z "`which fuser`"
+ then
+ ps_line=`ps ax | grep 'qpe$'` # no -w on busybox
+ qpe_pid=`get_pid $ps_line`
+ #echo qpe_pid = $qpe_pid >> /tmp/sd
+ target_pids=`fuser -m $DEVICE | cut -d : -f2`
+ #echo $target_pids >> /tmp/sd
+ if [ "$target_pids" = "" ]; then
+ return
+ fi
+ is_exist_qpe=`echo $target_pids | grep $qpe_pid` # no -w on busybox
+ if [ "$is_exist_qpe" = "" ]; then
+ kill -9 $target_pids
+ #echo kill -9 $target_pids >> /tmp/sd
+ else
+ #echo "found qpe!!!" >> /tmp/sd
+ target_pids=`echo $target_pids | sed -e "s/$qpe_pid//"`
+ if [ "$target_pids" != "" ]; then
+ kill -9 $target_pids
+ #echo kill -9 $target_pids >> /tmp/sd
+ fi
+ wait_release
+ exit 0
+ fi
fi
}
###### for QPE ######
@@ -230,17 +234,13 @@ case "$ACTION" in
'compeject')
for part in `mount | grep mmcda|awk '{print $1}'`
do
- DEVICE="$part"
+ DEVICE="$part" || echo "umount $DEVICE failed!"
kill_task # for QPE
- #fuser -k -m $DEVICE > /dev/null
- umount $DEVICE
- if [ $? != 0 ]; then
- usleep 500000
- umount $DEVICE
- fi
- rm $SMB_MOUNT
+ umount $DEVICE >/dev/null 2>&1 || echo -e "\n* * * WARNING: umount $DEVICE failed! * * *"
+
+ test -e "$SMB_MOUNT" && rm $SMB_MOUNT
done
;;
'change')