mirror of
https://github.com/freemkv/libfreemkv.git
synced 2026-10-07 18:13:10 +00:00
docs: reconcile unlock-bridge with the current single-unlock dispatch
This commit is contained in:
+22
-14
@@ -2,23 +2,31 @@
|
||||
|
||||
Bridges libfreemkv's drive layer to the `freemkv-unlock` crate: one generic
|
||||
SCSI-transport adapter, identity/host-cert mapping, and the dispatch that
|
||||
news up `all_unlockers()` and runs the first matching one. libfreemkv names
|
||||
no individual unlocker — it only calls this bridge.
|
||||
assembles the unlocker list and runs each one's `unlock()` until one claims
|
||||
the drive. libfreemkv names no individual unlocker — it only calls this bridge.
|
||||
|
||||
## `Dispatch`
|
||||
|
||||
Result of a capability dispatch: `(matched_name, result)`. `matched_name` is
|
||||
the unlocker that handled it (or `""` if none did) — lets the caller record
|
||||
WHICH unlocker ran (e.g. `MT1959` vs `Renesas`), distinct from the id-only
|
||||
identity lookup `unlocker_name`. Iterating stops at the first unlocker whose
|
||||
capability method returns anything other than `NotApplicable` — i.e. an actual
|
||||
unlock (`Ok`) OR a real failure such as a dead bus (`Err(Transport)`), which
|
||||
the caller must surface rather than skip.
|
||||
Result of a dispatch: `(matched_name, result)`. `matched_name` is the
|
||||
unlocker that handled it (or `""` if none did) — lets the caller record WHICH
|
||||
unlocker ran (e.g. `LD` vs `Renesas`), distinct from the id-only identity
|
||||
lookup `unlocker_name`. Iterating stops at the first unlocker whose
|
||||
`unlock()` returns anything other than `Ok(None)` — i.e. an actual unlock
|
||||
(`Ok(Some)`) OR a real failure such as a dead bus (`Err`), which the caller
|
||||
must surface rather than skip.
|
||||
|
||||
## `run_features` / `run_bus`
|
||||
|
||||
Both build their own fixed `Vec<Box<dyn fu::Unlocker>>` — `run_features` the
|
||||
firmware unlockers (freemkv, LD, Renesas), `run_bus` the disc-keyed ones
|
||||
(AACS, DVD) — and hand it to the shared `run()` loop. There is no
|
||||
`all_unlockers()` registry; adding or removing an unlocker means editing
|
||||
both this file's two lists and `unlocker_names()` below.
|
||||
|
||||
## `unlocker_names`
|
||||
|
||||
The names of every REGISTERED unlocker, in dispatch order. Registry-driven —
|
||||
sourced from `all_unlockers()`, so adding/removing an unlocker updates every
|
||||
report with no other change (no hardcoded names). The per-unlocker "did it
|
||||
run this rip" outcome is computed by the caller, which has the disc + drive
|
||||
runtime state this crate cannot see.
|
||||
The unlocker names, in dispatch order, for the user-facing unlocker matrix.
|
||||
A hardcoded `vec!["freemkv", "LD", "Renesas", "AACS", "DVD"]` — kept in sync
|
||||
with `run_features`/`run_bus` by hand, not registry-driven. The per-unlocker
|
||||
"did it run this rip" outcome is computed by the caller, which has the disc +
|
||||
drive runtime state this crate cannot see.
|
||||
|
||||
@@ -118,7 +118,7 @@ fn run(
|
||||
("", Ok(None))
|
||||
}
|
||||
|
||||
/// Drive-prep: run the FIRMWARE unlockers (freemkv / MT1959 / Renesas), which
|
||||
/// Drive-prep: run the FIRMWARE unlockers (freemkv / LD / Renesas), which
|
||||
/// key off the drive rather than the disc, so `kind` is `Unknown` and they need
|
||||
/// no certs. Each removes bus encryption at the drive and reads the OEM Volume
|
||||
/// ID best-effort.
|
||||
|
||||
Reference in New Issue
Block a user