Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix creating loopdevs with read-only backing files #43

Merged
merged 1 commit into from
Oct 12, 2021

Conversation

klhowell
Copy link
Contributor

@klhowell klhowell commented Oct 9, 2021

Currently, when a new loopdev is created with LO_FLAGS_READ_ONLY set, the backing file is still opened in RW mode. This call fails when the user does not have write-permissions on the file (for example, the file is on a read-only filesystem). This patch checks for LO_FLAGS_READ_ONLY and opens the file without write mode if the flag is set.

@mdaffin mdaffin merged commit 16e7567 into mdaffin:master Oct 12, 2021
@mdaffin
Copy link
Owner

mdaffin commented Oct 12, 2021

Thanks for that. Will try to get a release out in the next week or so.

@flxo
Copy link
Contributor

flxo commented Oct 25, 2021

@mdaffin Would you mind to file a release? That would be awesome and I can get rid of one more git dependency.

Thanks a lot!

@mdaffin
Copy link
Owner

mdaffin commented Oct 27, 2021

Sorry for the wait. 0.4.0 has now been released and includes these changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants