File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 88
99## Changed
1010- Changed ordering of ` proto::pci::PciIoAddress ` to (bus -> dev -> fun -> reg -> ext_reg).
11+ - Return request with status as error data object for ` proto::ata::pass_thru::AtaDevice ` .
1112
1213# uefi - v0.36.1 (2025-11-05)
1314
Original file line number Diff line number Diff line change @@ -182,20 +182,25 @@ impl AtaDevice<'_> {
182182 /// - [`Status::UNSUPPORTED`] The host adapter does not support the command described by the ATA command.
183183 /// The command was not sent, and no additional status information is available.
184184 /// - [`Status::TIMEOUT`] A timeout occurred while waiting for the ATA command to execute. Refer to `Asb` for additional status details.
185+ #[ allow( clippy:: result_large_err) ]
185186 pub fn execute_command < ' req > (
186187 & mut self ,
187188 mut req : AtaRequest < ' req > ,
188- ) -> crate :: Result < AtaResponse < ' req > > {
189+ ) -> crate :: Result < AtaResponse < ' req > , AtaResponse < ' req > > {
189190 req. packet . acb = & req. acb ;
190- unsafe {
191+ let result = unsafe {
191192 ( ( * self . proto . get ( ) ) . pass_thru ) (
192193 self . proto . get ( ) ,
193194 self . port ,
194195 self . pmp ,
195196 & mut req. packet ,
196197 ptr:: null_mut ( ) ,
197198 )
198- . to_result_with_val ( || AtaResponse { req } )
199+ . to_result ( )
200+ } ;
201+ match result {
202+ Ok ( _) => Ok ( AtaResponse { req } ) ,
203+ Err ( s) => Err ( crate :: Error :: new ( s. status ( ) , AtaResponse { req } ) ) ,
199204 }
200205 }
201206}
You can’t perform that action at this time.
0 commit comments