automount works after reformat!

This commit is contained in:
2025-07-29 14:52:50 -06:00
parent 0d77321bb3
commit 1d03640d5b
2 changed files with 5 additions and 5 deletions

View File

@@ -268,8 +268,8 @@ impl<'d, D: Driver<'d>> MassStorageClass<'d, D> {
.map_err(|_| ())
}
ScsiCommand::PreventAllowMediumRemoval { prevent: _prevent } => Ok(()),
ScsiCommand::StartStopUnit { stop, load_eject } => {
if stop && load_eject {
ScsiCommand::StartStopUnit { start, load_eject } => {
if !start && load_eject {
self.state = State::Ejected;
self.last_sense = Some(ScsiError::NotReady);
}

View File

@@ -91,7 +91,7 @@ pub enum ScsiCommand {
},
StartStopUnit {
stop: bool,
start: bool,
load_eject: bool,
},
}
@@ -156,8 +156,8 @@ pub fn parse_cb(cb: &[u8]) -> ScsiCommand {
prevent: (cb[1] & 0b00000001) != 0,
},
START_STOP_UNIT => ScsiCommand::StartStopUnit {
stop: (cb[1] & 0b00000001) != 0,
load_eject: (cb[1] & 0b00000010) == 0,
start: (cb[4] & 0b00000001) != 0,
load_eject: (cb[4] & 0b00000010) != 0,
},
_ => ScsiCommand::Unknown,
}