Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

unsafe_disable_usb_drive() cannot be undone

Abierto
#11,394 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@dhalbert ya está trabajando en esto.

Desde el 8/10/2026.

  • #11530 de @dhalbert — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
c
Área
embedded-iot

Línea de trabajo

Start with the implementations of storage.unsafe_disable_usb_drive(), storage.enable_usb_drive(), and storage.remount(); trace how USB visibility and host write access are handled after disabling the drive. Reproduce the reported sequence on the stated RP2040 board. Done means the drive can be restored to its prior host access mode and remounting does not fail when the drive is no longer visible over USB.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

advanced api bug circuitpython api
CircuitPython version and board name
Adafruit CircuitPython 10.3.1 on 2026-09-14; Raspberry Pi Pico with rp2040
Code/REPL
>>> import storage
>>> storage.unsafe_disable_usb_drive()
>>> storage.remount("/", readonly=True, disable_concurrent_write_protection=True)
Zurückverfolgung (jüngste Aufforderung zuletzt):
  Datei "<stdin>", Zeile 1, in <module>
RuntimeError: Der Pfad kann nicht neu gemountet werden, wenn er über USB sichtbar ist.
Behavior

I fail to enable the usb-drive again in normal read-write mode for the host. After disabling the drive, I can re-enable it with storage.enable_usb_drive(), but it is read-only for the host. The docs say:

If you call enable_usb_drive() after code.py starts or in the REPL, you can reverse the effect of a previous unsafe_disable_usb_drive(). The CIRCUITPY drive will reappear to the host, and become read-only again if it was previously read-only.

Before storage.unsafe_disable_usb_drive() it was read-write for the host, so I expect it to be read-write again?!

The RunTime error above is also an error: after storage.unsafe_disable_usb_drive() the drive is not visible via USB, so no need to bail out.

Description

No response

Additional information

Detected with 10.3.0 already, but nothing changed with 10.3.1.

Lenguaje dominante
C
Estrellas
4.6k
Forks
1.4k
Merge medio
1 d 8 h
PR fusionados (30 d)
153

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de adafruit/circuitpython

Todos los issues de adafruit/circuitpython

Issues similares

Más issues de C

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.