Skip to content

f3write: Return if the drive has been unplugged - #289

Merged
AltraMayor merged 1 commit into
AltraMayor:masterfrom
Priyanshu3820:fix-unplug-behav
Sep 21, 2026
Merged

AltraMayor merged 1 commit into
AltraMayor:masterfrom
Priyanshu3820:fix-unplug-behav

Conversation

@Priyanshu3820

Copy link
Copy Markdown
Contributor

This patch prevents f3write from writing on the root filesystem once the drive has been removed by checking ENODEV
I couldn't reproduce the behavior after patching it up(since it just crashes with an EIO error most of the times) but I successfully verified it inside gdb.
Fixes #174

@Priyanshu3820

Copy link
Copy Markdown
Contributor Author

@AltraMayor

@AltraMayor
AltraMayor merged commit eb3a8e9 into AltraMayor:master Sep 21, 2026
26 checks passed
@AltraMayor

Copy link
Copy Markdown
Owner

Thank you for investigating and solving this problem, @Priyanshu3820.

@Priyanshu3820
Priyanshu3820 deleted the fix-unplug-behav branch September 22, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

f3read/f3write doesn't detect when a usb-stick is unplugged on linux

2 participants