diff --git a/checkbox-support/checkbox_support/scripts/usb_read_write.py b/checkbox-support/checkbox_support/scripts/usb_read_write.py index 0668e8f10d..67f7906a36 100644 --- a/checkbox-support/checkbox_support/scripts/usb_read_write.py +++ b/checkbox-support/checkbox_support/scripts/usb_read_write.py @@ -170,6 +170,8 @@ def mount_usb_storage(partition): # use pipe so I could hide message like # "umount: /tmp/tmpjzwb6lys: not mounted" subprocess.call(["umount", FOLDER_TO_MOUNT], stderr=subprocess.PIPE) + # umount device_to_mount such as "umount /dev/mmcblk0p1" to avoid when the storage type is ntfs, which could not be mounted twice. + subprocess.call(["umount", device_to_mount], stderr=subprocess.PIPE) # mount the target device/partition # if the return code of the shell command is non-zero, # means something wrong.