summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/yardstick-img-modify6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/yardstick-img-modify b/tools/yardstick-img-modify
index c28e2ad59..68ce6e223 100755
--- a/tools/yardstick-img-modify
+++ b/tools/yardstick-img-modify
@@ -152,9 +152,15 @@ cleanup() {
mount | grep $mountdir/proc && umount $mountdir/proc
mount | grep $mountdir && umount $mountdir
mount | grep "/mnt/vivid" && umount "/mnt/vivid"
+
if [ -f $raw_imgfile ]; then
+ #kpartx -dv $raw_imgfile sometimes failed, we should checked it agein.
+ #if [ -z "$(kpartx -l $raw_imgfile | grep 'loop deleted')" ]; then
+ # kpartx -dv $raw_imgfile
+ #fi
kpartx -dv $raw_imgfile || true
fi
+
rm -f $raw_imgfile
rm -rf $mountdir
}