ld: drive-prep guard (fire only at kind==Unknown) + firmware_unlocker_name
Restore ld's drive-prep match guard so the firmware unlocker fires exactly once (at drive-prep, kind==Unknown) and never re-fires during the content-keyed Aacs/Css dispatch — the consumer (libfreemkv) dispatches at three points (init/cert/css) with the appropriate kind. Add firmware_unlocker_name(drive_id) for "is this drive supported?" drive-info display without unlocking. 89 tests.
This commit is contained in:
@@ -114,6 +114,13 @@ pub trait Unlocker: Send + Sync {
|
||||
) -> std::result::Result<Unlocked, UnlockError>;
|
||||
}
|
||||
|
||||
/// Name of the firmware unlocker that supports this drive (for drive-info "is
|
||||
/// this drive supported?" display), or `None`. A pure profile lookup — does NOT
|
||||
/// touch the drive or unlock anything.
|
||||
pub fn firmware_unlocker_name(drive_id: &DriveId) -> Option<&'static str> {
|
||||
ld::firmware_name(drive_id)
|
||||
}
|
||||
|
||||
/// Every unlocker, in dispatch order (firmware → cert → css). This is the ONLY
|
||||
/// place an unlocker is named. Remove one = delete its line here + its module
|
||||
/// dir; the consumer never changes.
|
||||
|
||||
Reference in New Issue
Block a user