Add support for raw devices#6960
Merged
Merged
Conversation
Member
|
It appears to be fine, except that windows.h should be included before winioctl.h in qt_platform.cpp, otherwise compilation is broken. |
Contributor
Author
Thank you for pointing this out. I made a small change to reflect the comment. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR allows to use a physical device as an HDD disk.
I have tested with an external CompactFlash card (2GB) and running under MacOS and under FreeBSD.
This is the first time I contribute something to the project which touches C/C++ code - therefore, I am surely missing lots of things here...
Note - I touched the CMakeLists.txt file to compile the software under MacOS with brew - maybe these changes can be removed?
What could be done better?
Currently I have tested this by selecting the "new..." under the HDD dialog - the CHS should be automatically chosen and shown, not only when clicking "ok".
When the device is detected to be a raw/block device, probably some settings should be greyed out in the disk dialog.
I have added a setting to the configuration to signal that the device is raw/block device.
Maybe this could also be made visible in the GUI?
Note: due to what I wrote above, this patch is most likely incomplete - while the bare functionality seems to work (and it kind of does what I want :-) ), it probably needs some further adjustments before it goes to the main branch; my intention of doing the PR is to show a bit of code to achieve an initial draft of the feature I would like to kindly ask to be implemented.
Thank you for the awesome project :-)
Checklist
References