@@ -101,23 +101,26 @@ impl RequestHandler for MessageHeader {
101101 } ;
102102
103103 match nmimt {
104- MessageType :: NvmeMiCommand => match NvmeMiCommandRequestHeader :: from_bytes ( ( rest, 0 ) ) {
105- Ok ( ( ( rest, _) , ch) ) => ch. handle ( & ch, mep, subsys, rest, resp, app) . await ,
106- Err ( err) => {
107- debug ! ( "Unable to parse NVMeMICommandHeader from message buffer: {err:?}" ) ;
108- // TODO: This is a bad assumption: Can see DekuError::InvalidParam too
109- Err ( ResponseStatus :: InvalidCommandSize )
104+ MessageType :: NvmeMiCommand => {
105+ match & NvmeMiCommandRequestHeader :: from_bytes ( ( rest, 0 ) ) {
106+ Ok ( ( ( rest, _) , ch) ) => ch. handle ( ch, mep, subsys, rest, resp, app) . await ,
107+ Err ( err) => {
108+ debug ! ( "Unable to parse NVMeMICommandHeader from message buffer: {err:?}" ) ;
109+ // TODO: This is a bad assumption: Can see DekuError::InvalidParam too
110+ Err ( ResponseStatus :: InvalidCommandSize )
111+ }
110112 }
111- } ,
112- MessageType :: NvmeAdminCommand => match AdminCommandRequestHeader :: from_bytes ( ( rest, 0 ) )
113- {
114- Ok ( ( ( rest, _) , ch) ) => ch. handle ( & ch, mep, subsys, rest, resp, app) . await ,
115- Err ( err) => {
116- debug ! ( "Unable to parse AdminCommandHeader from message buffer: {err:?}" ) ;
117- // TODO: This is a bad assumption: Can see DekuError::InvalidParam too
118- Err ( ResponseStatus :: InvalidCommandSize )
113+ }
114+ MessageType :: NvmeAdminCommand => {
115+ match & AdminCommandRequestHeader :: from_bytes ( ( rest, 0 ) ) {
116+ Ok ( ( ( rest, _) , ch) ) => ch. handle ( ch, mep, subsys, rest, resp, app) . await ,
117+ Err ( err) => {
118+ debug ! ( "Unable to parse AdminCommandHeader from message buffer: {err:?}" ) ;
119+ // TODO: This is a bad assumption: Can see DekuError::InvalidParam too
120+ Err ( ResponseStatus :: InvalidCommandSize )
121+ }
119122 }
120- } ,
123+ }
121124 _ => {
122125 debug ! ( "Unimplemented NMINT: {:?}" , ctx. nmimt( ) ) ;
123126 Err ( ResponseStatus :: InternalError )
0 commit comments