v0.25.14: rename Drive raw-read API to remove third-party project breadcrumbs

Pure rename pass — no behavioral change:
- Drive::is_libredrive_active() → Drive::is_raw_read_active()
- PlatformDriver::is_libredrive_active() trait method (same rename)
- Mt1959 struct field libredrive_active → raw_read_active
- Error::AacsLibredriveUnsupported → Error::AacsRawReadUnsupported
  (numeric code E7016 unchanged)
- All callers, tests, and doc comments updated to the new name.

Old identifiers removed entirely; downstream consumers must update.
Mirrored in bdemu, freemkv, autorip, freemkv-tools.
This commit is contained in:
MattJackson
2026-05-21 14:43:20 -07:00
parent 1805d92ca4
commit a956c6ad94
9 changed files with 77 additions and 60 deletions
+7 -8
View File
@@ -17,10 +17,10 @@ impl Disc {
/// SCSI handshake — AACS mutual auth via host certs from the keydb,
/// returning VID (and bus keys when applicable) on success.
///
/// `Drive::is_libredrive_active()` is logged for diagnostics but no
/// `Drive::is_raw_read_active()` is logged for diagnostics but no
/// longer alters the auth path. v0.25.11 introduced a "raw-read VID"
/// shortcut that issued `READ_DISC_STRUCTURE` format 0x80 with
/// AGID=0 on libredrive-active drives, on the hypothesis that the
/// AGID=0 on raw-read-active drives, on the hypothesis that the
/// firmware-uploaded drive would serve VID without cert auth. The
/// BU40N returned 0x05/0x6F/0x02 (`KEY NOT ESTABLISHED`) to that
/// CDB — the AACS spec requires an AGID established via successful
@@ -33,7 +33,7 @@ impl Disc {
/// Returns `(handshake, error)`:
/// * `(Some(_), None)` — VID acquired
/// * `(None, Some(_))` — specific failure mode (see
/// `AacsHostCertRejected` / `AacsLibredriveUnsupported` /
/// `AacsHostCertRejected` / `AacsRawReadUnsupported` /
/// `AacsVidUnavailable` variants in `error.rs`)
/// * `(None, None)` — handshake not attempted (no keydb;
/// resolution will proceed with VID=zero and rely on path 1
@@ -45,7 +45,7 @@ impl Disc {
tracing::warn!(
target: "freemkv::disc",
phase = "handshake_entry",
libredrive_active = session.is_libredrive_active(),
raw_read_active = session.is_raw_read_active(),
"do_handshake entered"
);
@@ -101,10 +101,9 @@ impl Disc {
if host_cert_count == 0 {
// No host certs in keydb -> cert auth cannot proceed.
// Surface as
// LibredriveUnsupported so the caller knows neither path
// is available on this configuration.
return (None, Some(Error::AacsLibredriveUnsupported));
// Surface as RawReadUnsupported so the caller knows
// neither path is available on this configuration.
return (None, Some(Error::AacsRawReadUnsupported));
}
// v0.25.7 wedge fix. Pre-0.25.7 this loop fired up to 16 AACS
+2 -2
View File
@@ -1044,7 +1044,7 @@ impl Disc {
/// All disc reads use standard READ(10) via UDF -- no vendor SCSI commands.
pub fn scan(session: &mut Drive, opts: &ScanOptions) -> Result<Self> {
// AACS handshake (Blu-ray/UHD). Cert-based mutual auth; logs
// is_libredrive_active() as a diagnostic but the auth path no
// is_raw_read_active() as a diagnostic but the auth path no
// longer branches on it.
let (handshake, handshake_error) = Self::do_handshake(session, opts);
@@ -1133,7 +1133,7 @@ impl Disc {
/// Core scan pipeline — works with any SectorSource.
///
/// `handshake_error` is plumbed from `do_handshake` so failures
/// (cert rejected, libredrive unsupported, VID read failed) are
/// (cert rejected, raw-read unsupported, VID read failed) are
/// preserved as `disc.aacs_error` for callers to render. When key
/// resolution succeeds despite the handshake failure (built-in
/// keys + disc-hash lookup hit) the error is dropped.