mirror of
https://github.com/freemkv/freemkv-unlock.git
synced 2026-10-07 18:13:11 +00:00
9a4f29b04c137f87b1c543989e35e0cec2884c22
dev is where work lands and is meant to be pushed to often, so what runs there should be the cheap answer to "did I break it": lint, tests and the Linux build. The macOS and Windows jobs now run on qa and main instead of on every push to dev. Nothing is deleted and no platform goes unchecked before a release. qa.yml already covers macOS and Windows independently, and the jobs that live only here -- the Intel macOS build, the Windows release build -- still run, on the branches where a cross-platform break is worth blocking on. They are SKIPPED on dev via `if`, not left unscheduled. A queued job would be worse than a slow one: release.sh's CI gate refuses while any run for the commit is still in progress, so a job that never gets a runner blocks releases silently, with no error anywhere. That is the failure the real-media note in qa.yml describes, and it is why this is an `if` on the job rather than a narrower set of trigger branches.
freemkv-unlock
The unlock layer for the freemkv toolchain.
An unlocker removes a drive-level bus-encryption barrier so the drive serves readable (de-bus'd / de-scrambled) sectors. Content-key decryption is a separate concern — the consumer's job.
This crate defines the Unlocker contract and a generic SCSI transport
contract, and holds the self-contained unlocker modules. The consumer
(libfreemkv) depends on this crate and
dispatches through all_unlockers(); it never names an individual unlocker, and
clients of libfreemkv are oblivious to unlockers entirely (as they are to the
SCSI layer).
use freemkv_unlock::UnlockError;
// Drive-prep: try each unlocker's feature unlock until one claims the drive.
// `NotApplicable` means "not this unlocker's drive" — move on; a transport
// error means a dead bus — abort. `unlock_bus` follows the same contract for
// removing per-disc bus encryption.
for u in freemkv_unlock::all_unlockers() {
match u.unlock_features(&mut scsi, &ctx) {
Ok(unlocked) => return Ok(unlocked),
Err(UnlockError::NotApplicable) => continue,
Err(e) => return Err(e),
}
}
To remove an unlocker, delete its module directory and its one line in
all_unlockers() — nothing else changes.
License: MIT.
Languages
Rust
100%