@@ -68,7 +68,7 @@ impl DynCommand for Command {
6868
6969impl Command {
7070 fn lock ( & self , m : & clap:: ArgMatches ) -> Result < ( ) > {
71- sys :: dtx :: Device :: open ( )
71+ sdtx :: Device :: open ( )
7272 . context ( "Failed to open DTX device" ) ?
7373 . latch_lock ( )
7474 . context ( "Failed to lock latch" ) ?;
@@ -81,7 +81,7 @@ impl Command {
8181 }
8282
8383 fn unlock ( & self , m : & clap:: ArgMatches ) -> Result < ( ) > {
84- sys :: dtx :: Device :: open ( )
84+ sdtx :: Device :: open ( )
8585 . context ( "Failed to open DTX device" ) ?
8686 . latch_unlock ( )
8787 . context ( "Failed to unlock latch" ) ?;
@@ -94,7 +94,7 @@ impl Command {
9494 }
9595
9696 fn request ( & self , m : & clap:: ArgMatches ) -> Result < ( ) > {
97- sys :: dtx :: Device :: open ( )
97+ sdtx :: Device :: open ( )
9898 . context ( "Failed to open DTX device" ) ?
9999 . latch_request ( )
100100 . context ( "Failed to send latch request" ) ?;
@@ -107,7 +107,7 @@ impl Command {
107107 }
108108
109109 fn confirm ( & self , m : & clap:: ArgMatches ) -> Result < ( ) > {
110- sys :: dtx :: Device :: open ( )
110+ sdtx :: Device :: open ( )
111111 . context ( "Failed to open DTX device" ) ?
112112 . latch_confirm ( )
113113 . context ( "Failed to send confirmation" ) ?;
@@ -120,7 +120,7 @@ impl Command {
120120 }
121121
122122 fn heartbeat ( & self , m : & clap:: ArgMatches ) -> Result < ( ) > {
123- sys :: dtx :: Device :: open ( )
123+ sdtx :: Device :: open ( )
124124 . context ( "Failed to open DTX device" ) ?
125125 . latch_heartbeat ( )
126126 . context ( "Failed to send heartbeat" ) ?;
@@ -133,7 +133,7 @@ impl Command {
133133 }
134134
135135 fn cancel ( & self , m : & clap:: ArgMatches ) -> Result < ( ) > {
136- sys :: dtx :: Device :: open ( )
136+ sdtx :: Device :: open ( )
137137 . context ( "Failed to open DTX device" ) ?
138138 . latch_cancel ( )
139139 . context ( "Failed to cancel detachment" ) ?;
@@ -146,7 +146,7 @@ impl Command {
146146 }
147147
148148 fn get_base_info ( & self , m : & clap:: ArgMatches ) -> Result < ( ) > {
149- let info = sys :: dtx :: Device :: open ( )
149+ let info = sdtx :: Device :: open ( )
150150 . context ( "Failed to open DTX device" ) ?
151151 . get_base_info ( )
152152 . context ( "Failed to get base info" ) ?;
@@ -167,7 +167,7 @@ impl Command {
167167 }
168168
169169 fn get_device_mode ( & self , _m : & clap:: ArgMatches ) -> Result < ( ) > {
170- let mode = sys :: dtx :: Device :: open ( )
170+ let mode = sdtx :: Device :: open ( )
171171 . context ( "Failed to open DTX device" ) ?
172172 . get_device_mode ( )
173173 . context ( "Failed to get device mode" ) ?;
@@ -177,7 +177,7 @@ impl Command {
177177 }
178178
179179 fn get_latch_status ( & self , _m : & clap:: ArgMatches ) -> Result < ( ) > {
180- let status = sys :: dtx :: Device :: open ( )
180+ let status = sdtx :: Device :: open ( )
181181 . context ( "Failed to open DTX device" ) ?
182182 . get_latch_status ( )
183183 . context ( "Failed to get latch status" ) ?;
@@ -187,7 +187,7 @@ impl Command {
187187 }
188188
189189 fn monitor ( & self , m : & clap:: ArgMatches ) -> Result < ( ) > {
190- let mut device = sys :: dtx :: Device :: open ( )
190+ let mut device = sdtx :: Device :: open ( )
191191 . context ( "Failed to open DTX device" ) ?;
192192
193193 let events = device. events ( )
@@ -216,7 +216,7 @@ impl Command {
216216}
217217
218218
219- struct PrettyBaseInfo ( sys :: dtx :: BaseInfo ) ;
219+ struct PrettyBaseInfo ( sdtx :: BaseInfo ) ;
220220
221221impl serde:: Serialize for PrettyBaseInfo {
222222 fn serialize < S > ( & self , serializer : S ) -> Result < S :: Ok , S :: Error >
@@ -228,15 +228,15 @@ impl serde::Serialize for PrettyBaseInfo {
228228 let mut s = serializer. serialize_struct ( "BaseInfo" , 3 ) ?;
229229
230230 match self . 0 . state {
231- sys :: dtx :: BaseState :: Attached => s. serialize_field ( "state" , "attached" ) ,
232- sys :: dtx :: BaseState :: Detached => s. serialize_field ( "state" , "detached" ) ,
233- sys :: dtx :: BaseState :: NotFeasible => s. serialize_field ( "state" , "not-feasible" ) ,
231+ sdtx :: BaseState :: Attached => s. serialize_field ( "state" , "attached" ) ,
232+ sdtx :: BaseState :: Detached => s. serialize_field ( "state" , "detached" ) ,
233+ sdtx :: BaseState :: NotFeasible => s. serialize_field ( "state" , "not-feasible" ) ,
234234 } ?;
235235
236236 match self . 0 . device_type {
237- sys :: dtx :: DeviceType :: Hid => s. serialize_field ( "type" , "hid" ) ,
238- sys :: dtx :: DeviceType :: Ssh => s. serialize_field ( "type" , "ssh" ) ,
239- sys :: dtx :: DeviceType :: Unknown ( x) => s. serialize_field ( "type" , & x) ,
237+ sdtx :: DeviceType :: Hid => s. serialize_field ( "type" , "hid" ) ,
238+ sdtx :: DeviceType :: Ssh => s. serialize_field ( "type" , "ssh" ) ,
239+ sdtx :: DeviceType :: Unknown ( x) => s. serialize_field ( "type" , & x) ,
240240 } ?;
241241
242242 s. serialize_field ( "id" , & self . 0 . id ) ?;
@@ -245,16 +245,16 @@ impl serde::Serialize for PrettyBaseInfo {
245245}
246246
247247
248- struct PrettyEvent ( sys :: dtx :: Event ) ;
248+ struct PrettyEvent ( sdtx :: Event ) ;
249249
250250impl serde:: Serialize for PrettyEvent {
251251 fn serialize < S > ( & self , serializer : S ) -> Result < S :: Ok , S :: Error >
252252 where
253253 S : serde:: Serializer
254254 {
255255 use serde:: ser:: SerializeStruct ;
256- use sys :: dtx :: { DeviceType , Event , HardwareError , RuntimeError , uapi} ;
257- use sys :: dtx :: event:: { BaseState , CancelReason , DeviceMode , LatchStatus } ;
256+ use sdtx :: { DeviceType , Event , HardwareError , RuntimeError , uapi} ;
257+ use sdtx :: event:: { BaseState , CancelReason , DeviceMode , LatchStatus } ;
258258
259259 match & self . 0 {
260260 Event :: Request => {
@@ -357,8 +357,8 @@ impl serde::Serialize for PrettyEvent {
357357
358358impl std:: fmt:: Display for PrettyEvent {
359359 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
360- use sys :: dtx :: { DeviceType , Event } ;
361- use sys :: dtx :: event:: { BaseState , CancelReason , DeviceMode , LatchStatus } ;
360+ use sdtx :: { DeviceType , Event } ;
361+ use sdtx :: event:: { BaseState , CancelReason , DeviceMode , LatchStatus } ;
362362
363363 match & self . 0 {
364364 Event :: Request => {
0 commit comments