cholcombe973 / block-utils

Rust utilities for working with block devices
MIT License
22 stars 17 forks source link

Add Additional MediaType and DeviceType variants; upgrade nix and strum #46

Open iamjpotts opened 11 months ago

iamjpotts commented 11 months ago

MediaType::Unknown still exists but is now only used when the matching rules don't have any input to work with.

udev cannot be easily upgraded; there is a breaking change to Enumerator ownership related scan_devices which will require a significant refactor to some of the _iter functions.

Lastly I bumped the crate version from 0.11 to 0.12.0 to represent that this is a breaking change. [edited this comment to reflect your feedback]

iamjpotts commented 11 months ago

I've squished the two commits into one and changed the version to 0.12.0

In my own repos I often have a pre-release suffix on the version while there are unpublished changes in the default branch, but everyone's processes can be different.

iamjpotts commented 10 months ago

@cholcombe973

Doing a bit more experimentation on more hardware and VMs. I think i'm going to make a revision to the PR and can improve the media type matching rule.

In the mean time, it would be helpful for CI to be enabled. It's disabled due to this being my first PR to this repo.

cholcombe973 commented 10 months ago

Sure no problem. I thought I enabled it already but I clicked it again.

iamjpotts commented 10 months ago

@cholcombe973 i've made my updates to the matching rules and enum variants. They're not perfect but they should be an improvement.

Tested on VirtualBox, a server with a raid controller, and a consumer desktop.

iamjpotts commented 10 months ago

Added FilesystemType::Luks and deduplicated FilesystemType::to_str / impl fmt::Display for FilesystemType