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

Improved device support (and other improvements and bugfixes) #31

Merged
merged 62 commits into from
Jan 19, 2023

Conversation

t-w
Copy link
Collaborator

@t-w t-w commented Jan 11, 2023

This is mainly to address #17 - there was no way to operate on a device that could not be mounted. I have split these things (opening a device and mounting it) so that operation like formatting a clean image/device can be performed.

This separation required couple more changes, ie. geometry setting that was done in the mounting code is now done in the device code (where it should be, as this is a property of a device). In particular, it can be read directly from devices both on Windows and Linux. It is added to Windows native device and also implemented for Linux (for which I have implemented a prototype of native device support (NOT TESTED!!!).

I repeat: THE NATIVE DEVICE CODE IS NOT TESTED(!) and since it is dealing with SYSTEM DEVICES anyone testing this should be aware what is doing and that a mistake (or a bug...) can cost precious data. So please test it safely, never from root/admin and only on selected devices with properly set permissions, best on a separated system like a VM.
If the native device code is not needed (most cases, I bet...), I advice to build the library without it (with generic).

Also, I did some small changes to built the library in several environments (on Debian, cross-compiled for windows, and build on Windows with Visual Studio and CygWIn).

Concerning the issue with formatting the disks - I have created 2 command line tools: for creating and formatting floppy disk images. So this can be easily tested by users.

For other details please check the commits.

(I'll leave the PR for some time - if there's no comments I will merge it.)

…ng a device without mounting it (ie. without reading rootblock/volume information), lclevy#17
…ie. setting the directories with test files).
t-w and others added 27 commits January 9, 2023 22:55
…ns for status check - returned value is already a RETCODE (RC_OK or RC_ERROR).
@lclevy
Copy link
Owner

lclevy commented Jan 12, 2023

It seems you now know better than me this code I wrote 20 years ago. Thanks for improving it!

@t-w t-w merged commit 2398ad8 into lclevy:master Jan 19, 2023
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.

2 participants