unsafe_disable_usb_drive() cannot be undone
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
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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di adafruit/circuitpython
-
board breaks api
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
adafruit/circuitpython#11099 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
circuitpython api enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
adafruit/circuitpython#11505 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
adafruit/circuitpython#11472 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
adafruit/circuitpython#11467 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Add file truncate()Apertacpython api enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
adafruit/circuitpython#11402 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di adafruit/circuitpython
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
EchoTools/nevr-runtime#117 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
DarkFlippers/qUnleashed#240 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
AFLplusplus/AFLplusplus#2899 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
HarbourMasters/Shipwright#7320 ·
I maintainer di solito rispondono entro 1 giorno