File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
crates/muvm/src/guest/bin Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -77,9 +77,16 @@ fn main() -> Result<ExitCode> {
7777 rustix:: stdio:: dup2_stdout ( console. as_fd ( ) ) ?;
7878 rustix:: stdio:: dup2_stderr ( console. as_fd ( ) ) ?;
7979
80- Command :: new ( std:: option_env!( "MUVM_UDEVD_PATH" ) . unwrap_or ( "/usr/lib/systemd/systemd-udevd" ) )
81- . spawn ( )
82- . context ( "Running systemd-udevd" ) ?;
80+ const DEFAULT_UDEVD_PATH : & str = match std:: option_env!( "MUVM_UDEVD_PATH" ) {
81+ Some ( path) => path,
82+ None => "/usr/lib/systemd/systemd-udevd" ,
83+ } ;
84+ Command :: new (
85+ env:: var ( "MUVM_UDEVD_PATH" ) . unwrap_or_else ( |_| DEFAULT_UDEVD_PATH . parse ( ) . unwrap ( ) ) ,
86+ )
87+ . spawn ( )
88+ . context ( "Failed to execute `systemd-udevd` as a child process" ) ?;
89+ env:: remove_var ( "MUVM_UDEVD_PATH" ) ;
8390
8491 if let Some ( emulator) = options. emulator {
8592 match emulator {
You can’t perform that action at this time.
0 commit comments