File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -163,13 +163,15 @@ impl TryFrom<u16> for LatchStatus {
163163pub enum BaseState {
164164 Detached ,
165165 Attached ,
166+ NotFeasible ,
166167}
167168
168169impl BaseState {
169170 pub fn as_str ( & self ) -> & ' static str {
170171 match self {
171- BaseState :: Detached => "Detached" ,
172- BaseState :: Attached => "Attached" ,
172+ BaseState :: Detached => "Detached" ,
173+ BaseState :: Attached => "Attached" ,
174+ BaseState :: NotFeasible => "NotFeasible" ,
173175 }
174176 }
175177}
@@ -184,6 +186,10 @@ impl TryFrom<u16> for BaseState {
184186 type Error = DtxError ;
185187
186188 fn try_from ( value : u16 ) -> DtxResult < Self > {
189+ if value == uapi:: SDTX_DETACH_NOT_FEASIBLE {
190+ return Ok ( BaseState :: NotFeasible ) ;
191+ }
192+
187193 match translate_status_code ( value) ? {
188194 uapi:: SDTX_BASE_DETACHED => Ok ( BaseState :: Detached ) ,
189195 uapi:: SDTX_BASE_ATTACHED => Ok ( BaseState :: Attached ) ,
You can’t perform that action at this time.
0 commit comments