You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I'm looking at some test SD images which I made intentionally R/O. These fail to mount, since in SDCard.cpp:571 we explicitly open them with O_RDWR with no fallback.
Describe the solution you'd like
If open() fails, we should attempt to reopen the file with O_RDONLY or probe using access(2).
If O_RDONLY succeeds, for a proper simulation, mmap shouldn't have PROT_WRITE and we should also mark the CSD's PERM_WRITE_PROTECT bit and return errors during writes.
Describe alternatives you've considered
For now I just attempt to reopen with O_RDONLY to ensure I don't change testing images, but that's not a PR I would submit ;)
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I'm looking at some test SD images which I made intentionally R/O. These fail to mount, since in SDCard.cpp:571 we explicitly open them with O_RDWR with no fallback.
Describe the solution you'd like
If open() fails, we should attempt to reopen the file with O_RDONLY or probe using access(2).
If O_RDONLY succeeds, for a proper simulation, mmap shouldn't have PROT_WRITE and we should also mark the CSD's PERM_WRITE_PROTECT bit and return errors during writes.
Describe alternatives you've considered
For now I just attempt to reopen with O_RDONLY to ensure I don't change testing images, but that's not a PR I would submit ;)
The text was updated successfully, but these errors were encountered: