Skip to content

Commit d526628

Browse files
authored
Merge pull request #4462 from jepler/disable-usb-cdc
storage: Correct when we check for USB mounts
2 parents 2373e64 + 904e94a commit d526628

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

shared-module/storage/__init__.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ void common_hal_storage_remount(const char *mount_path, bool readonly, bool disa
149149
mp_raise_OSError(MP_EINVAL);
150150
}
151151

152-
#ifdef USB_AVAILABLE
152+
#if CIRCUITPY_USB_MSC
153153
if (!usb_msc_ejected()) {
154154
mp_raise_RuntimeError(translate("Cannot remount '/' when USB is active."));
155155
}

supervisor/usb.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ void usb_init(void);
5454
void usb_disconnect(void);
5555

5656
// Propagate plug/unplug events to the MSC logic.
57+
#if CIRCUITPY_USB_MSC
5758
void usb_msc_mount(void);
5859
void usb_msc_umount(void);
5960
bool usb_msc_ejected(void);
61+
#endif
6062

6163
#endif // MICROPY_INCLUDED_SUPERVISOR_USB_H

0 commit comments

Comments
 (0)