File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55pub mod mi;
66
77use deku:: ctx:: Endian ;
8- use deku:: { DekuRead , DekuWrite , deku_derive} ;
8+ use deku:: { DekuError , DekuRead , DekuWrite , deku_derive} ;
99use flagset:: flags;
10+ use log:: debug;
1011
1112use crate :: wire:: WireFlagSet ;
1213use crate :: wire:: WireString ;
@@ -106,9 +107,17 @@ unsafe impl Discriminant<u8> for AdminIoCqeStatusType {}
106107enum AdminIoCqeGenericCommandStatus {
107108 SuccessfulCompletion = 0x00 ,
108109 InvalidFieldInCommand = 0x02 ,
110+ InternalError = 0x06 ,
109111}
110112unsafe impl Discriminant < u8 > for AdminIoCqeGenericCommandStatus { }
111113
114+ impl From < DekuError > for AdminIoCqeGenericCommandStatus {
115+ fn from ( err : DekuError ) -> Self {
116+ debug ! ( "Codec operation failed: {err}" ) ;
117+ Self :: InternalError
118+ }
119+ }
120+
112121// Base v2.1, 4.6.1, Figure 137
113122// TODO: Unify with ControllerListResponse
114123#[ derive( Debug , DekuRead , Eq , PartialEq ) ]
You can’t perform that action at this time.
0 commit comments