From 07708f15185d96930621493c3e2886cc2e948622 Mon Sep 17 00:00:00 2001 From: Gadi Rotenberg Date: Sun, 9 Feb 2020 13:25:16 +0200 Subject: Added fix to allow remount when usb enabled but msc is ejected --- shared-module/storage/__init__.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'shared-module') diff --git a/shared-module/storage/__init__.c b/shared-module/storage/__init__.c index 215e1356a..c3d4b50c8 100644 --- a/shared-module/storage/__init__.c +++ b/shared-module/storage/__init__.c @@ -149,9 +149,7 @@ void common_hal_storage_remount(const char *mount_path, bool readonly, bool disa } #ifdef USB_AVAILABLE - // TODO(dhalbert): is this is a good enough check? It checks for - // CDC enabled. There is no "MSC enabled" check. - if (usb_enabled()) { + if (!usb_msc_ejected()) { mp_raise_RuntimeError(translate("Cannot remount '/' when USB is active.")); } #endif -- cgit v1.2.3