Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

unsafe_disable_usb_drive() cannot be undone

Aperta
#11,394 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c
Ambito
embedded-iot

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
C
Stelle
4.6k
Fork
1.4k
Merge medio
1g 6h
PR unite (30g)
145

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di adafruit/circuitpython

Tutte le issue di adafruit/circuitpython

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.