From 28a6e50ede08d6c2980dabce3ec40a58de38ad88 Mon Sep 17 00:00:00 2001 From: Matthew Jackson <1085847+MattJackson@users.noreply.github.com> Date: Tue, 28 Jul 2026 15:35:19 -0700 Subject: [PATCH] 1.6.0: version sync + fix stale docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bump to 1.6.0 (workspace sync, no functional change). Fix the README example that called the removed matches()/unlock() API — rewrite to the real unlock_features()/unlock_bus() contract (+ ld/README). --- CHANGELOG.md | 4 ++++ Cargo.toml | 2 +- README.md | 12 ++++++++++-- src/ld/README.md | 4 ++-- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 044e433..88a7880 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [1.6.0] — UNRELEASED + +Version sync with the workspace. No functional change in this crate. + ## [1.5.2] — 2026-07-22 ### Changed diff --git a/Cargo.toml b/Cargo.toml index ac6646e..2af06e6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "freemkv-unlock" -version = "1.5.2" +version = "1.6.0" edition = "2024" rust-version = "1.86" license = "MIT" diff --git a/README.md b/README.md index a7746e7..cb93b04 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,17 @@ clients of libfreemkv are oblivious to unlockers entirely (as they are to the SCSI layer). ```rust +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() { - if u.matches(&ctx) { - return u.unlock(&mut scsi, &ctx); + match u.unlock_features(&mut scsi, &ctx) { + Ok(unlocked) => return Ok(unlocked), + Err(UnlockError::NotApplicable) => continue, + Err(e) => return Err(e), } } ``` diff --git a/src/ld/README.md b/src/ld/README.md index f9e671c..f90c06d 100644 --- a/src/ld/README.md +++ b/src/ld/README.md @@ -10,8 +10,8 @@ decryption is a separate concern, handled by the consumer. Clients never name this module directly — [libfreemkv](https://github.com/freemkv/libfreemkv) dispatches through -`freemkv_unlock::all_unlockers()`, and this module answers `matches()` / -`unlock()` when the drive identity is one it supports. +`freemkv_unlock::all_unlockers()`, and this module answers `unlock_features()` / +`unlock_bus()` when the drive identity is one it supports. ## Scope: non-persistent unlock only