Skip to content

Commit

Permalink
Update usb_read_write.py
Browse files Browse the repository at this point in the history
Hi,
I also ran into this issue:
canonical#1587

I tried this change on my DUT and it works for mediacard test.
  • Loading branch information
Jefferyyen authored Nov 13, 2024
1 parent 542c748 commit 5b0861c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions checkbox-support/checkbox_support/scripts/usb_read_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5b0861c

Please sign in to comment.