File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
sw/host/opentitanlib/src/transport/qemu Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -271,6 +271,7 @@ pub struct Chardev {
271271#[ derive( Clone , Debug ) ]
272272pub enum ChardevKind {
273273 Pty { path : PathBuf } ,
274+ Socket { path : PathBuf } ,
274275 Other ,
275276}
276277
@@ -281,6 +282,13 @@ impl TryFrom<ChardevJson> for Chardev {
281282 let kind = if let Some ( path) = json. filename . strip_prefix ( "pty:" ) {
282283 let path = PathBuf :: from ( path) ;
283284 ChardevKind :: Pty { path }
285+ } else if let Some ( sock) = json. filename . strip_prefix ( "disconnected:unix:" ) {
286+ let path = sock
287+ . split ( ',' )
288+ . next ( )
289+ . with_context ( || format ! ( "bad socket path format: {sock}" ) ) ?;
290+ let path = PathBuf :: from ( path) ;
291+ ChardevKind :: Socket { path }
284292 } else {
285293 ChardevKind :: Other
286294 } ;
You can’t perform that action at this time.
0 commit comments