unsafe_disable_usb_drive() cannot be undone
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- c
- 领域
- embedded-iot
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- C
- 星标
- 4.6k
- 派生
- 1.4k
- 平均合并
- 1 天 6 小时
- 30 天内合并 PR
- 145
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
adafruit/circuitpython 的其他 Issue
-
board breaks api
难度 2/5 1-3 小时 新手友好度 68/100
adafruit/circuitpython#11099 · 3 条评论 ·
维护者通常 1 天内回复
-
circuitpython api enhancement
难度 5/5 一周以上 新手友好度 25/100
adafruit/circuitpython#11505 · 3 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 38/100
adafruit/circuitpython#11472 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 52/100
adafruit/circuitpython#11467 · 1 条评论 ·
维护者通常 1 天内回复
-
cpython api enhancement
难度 4/5 3-5 天 新手友好度 35/100
adafruit/circuitpython#11402 · 1 条评论 ·
维护者通常 1 天内回复
查看 adafruit/circuitpython 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
dkfans/keeperfx#5415 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
void-linux/void-runit#141 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
ARM-software/sysarch-acs#600 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复