drive: promote extract_scsi_context to pub
Small pure error->(status,sense) introspection helper the relocated sweep/patch will need externally. Same category as the prior WritebackFile/ resolve_content_key_map promotions -- infra, not policy. No behavior change.
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
//! optionally unlocks/initializes via the `freemkv-unlock` dispatch
|
//! optionally unlocks/initializes via the `freemkv-unlock` dispatch
|
||||||
//! (through [`crate::unlock_bridge`]), and reads sectors.
|
//! (through [`crate::unlock_bridge`]), and reads sectors.
|
||||||
|
|
||||||
pub(crate) fn extract_scsi_context(e: &Error) -> (u8, Option<crate::scsi::ScsiSense>) {
|
pub fn extract_scsi_context(e: &Error) -> (u8, Option<crate::scsi::ScsiSense>) {
|
||||||
match e {
|
match e {
|
||||||
Error::ScsiError { status, sense, .. } => (*status, *sense),
|
Error::ScsiError { status, sense, .. } => (*status, *sense),
|
||||||
Error::DiscRead { status, sense, .. } => (status.unwrap_or(0), *sense),
|
Error::DiscRead { status, sense, .. } => (status.unwrap_or(0), *sense),
|
||||||
|
|||||||
+1
-1
@@ -138,7 +138,7 @@ pub(crate) mod unlock_bridge;
|
|||||||
pub use drive::capture::{
|
pub use drive::capture::{
|
||||||
CapturedFeature, DriveCapture, capture_drive_data, mask_bytes, mask_string,
|
CapturedFeature, DriveCapture, capture_drive_data, mask_bytes, mask_string,
|
||||||
};
|
};
|
||||||
pub use drive::{Drive, DriveStatus, find_drive};
|
pub use drive::{Drive, DriveStatus, extract_scsi_context, find_drive};
|
||||||
|
|
||||||
// ─── Disc session (drive open + SCSI bring-up hoist) ─────────────────────────
|
// ─── Disc session (drive open + SCSI bring-up hoist) ─────────────────────────
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user