disc: Disc::unlocker_matrix() — registry-driven unlocker report

Returns each registered unlocker's name + whether it applies to this
drive+disc (via the unlock bridge over all_unlockers()). Disc crypto kind
derived in the library so the CLI and autorip render an identical, always-
current report with no hardcoded names. Also adds a Drive::unlocker_name()
runtime getter.
This commit is contained in:
Matthew Jackson
2026-07-01 10:00:59 -07:00
parent 541ca2139f
commit c781fb7193
3 changed files with 42 additions and 0 deletions
+9
View File
@@ -226,6 +226,15 @@ impl Drive {
crate::unlock_bridge::unlocker_name(&self.drive_id).is_some()
}
/// The name of the drive unlocker that ACTUALLY unlocked this drive at
/// `init()`, or `None` if none applied (unsupported drive, or the unlock
/// failed). Distinct from [`has_profile`](Self::has_profile), which reports
/// only an identity match: this is the runtime outcome. Apps render it in the
/// user-facing unlocker report.
pub fn unlocker_name(&self) -> Option<&str> {
self.unlocker_name.as_deref()
}
/// Access the SCSI transport for direct commands (used by CSS/AACS auth).
pub fn scsi_mut(&mut self) -> &mut dyn ScsiTransport {
self.scsi.as_mut()