Last active
January 25, 2024 08:36
-
-
Save davidhoness/0f45ef6a41bac6311614f109acbf92db to your computer and use it in GitHub Desktop.
Is it possible (and how) to add a check for open files to this watchdog, so that the unmount/mount only happens when no files are opened on the emulated stick? I plan to use this on a 3D printer, and I want the print to be finished before the stick is re-installed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This doesn't seem to quite work as-is with Raspbian Stretch. Based on some other people's comments, change
CMD_MOUNT = "modprobe g_mass_storage file=/piusb.bin stall=0 ro=1"
To
CMD_MOUNT = "modprobe g_mass_storage file=/piusb.bin stall=0 ro=0 removable=1"
That worked for me. I forked this gist with the modification.