File tree Expand file tree Collapse file tree
vuinputd/src/container_runtime Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -296,10 +296,28 @@ impl InjectionStrategy for Incus {
296296 async fn remove_device_node (
297297 & self ,
298298 _requesting_process : & RequestingProcess ,
299- _devname : & str ,
299+ devname : & str ,
300300 _major : u64 ,
301301 _minor : u64 ,
302302 ) -> anyhow:: Result < ( ) > {
303+ let container_name = get_scope ( ) ;
304+ let container_name = match container_name {
305+ global_config:: Scope :: Multi => bail ! ( "no container name given" ) ,
306+ global_config:: Scope :: Single ( container_name) => container_name,
307+ } ;
308+ let child = std:: process:: Command :: new ( "/usr/bin/incus" )
309+ . args ( [
310+ "config" ,
311+ "device" ,
312+ "remove" ,
313+ container_name,
314+ devname,
315+ ] )
316+ . spawn ( ) ?;
317+ let output = child. wait_with_output ( ) ?;
318+ let stdout = String :: from_utf8_lossy ( & output. stdout ) ;
319+ let stderr = String :: from_utf8_lossy ( & output. stderr ) ;
320+ println ! ( "incus\n {}\n {}\n " , stdout, stderr) ;
303321 Ok ( ( ) )
304322 }
305323
You can’t perform that action at this time.
0 commit comments