Skip to content

Commit 40230ef

Browse files
WhatAmISupposedToPutHereslp
authored andcommitted
Delete unused old x11 passthrough code
Signed-off-by: Sasha Finkelstein <[email protected]>
1 parent bf26efb commit 40230ef

2 files changed

Lines changed: 1 addition & 24 deletions

File tree

crates/muvm/src/bin/muvm.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -330,27 +330,6 @@ fn main() -> Result<ExitCode> {
330330
}
331331
}
332332

333-
// Forward the native X11 display into the guest as a socket
334-
if let Ok(x11_display) = env::var("DISPLAY") {
335-
if let Some(x11_display) = x11_display.strip_prefix(':') {
336-
let socket_path = Path::new("/tmp/.X11-unix/").join(format!("X{x11_display}"));
337-
if socket_path.exists() {
338-
let socket_path = CString::new(
339-
socket_path
340-
.to_str()
341-
.expect("socket_path should not contain invalid UTF-8"),
342-
)
343-
.context("Failed to process dynamic socket path as it contains NUL character")?;
344-
// SAFETY: `socket_path` is a pointer to a `CString` with long enough lifetime.
345-
let err = unsafe { krun_add_vsock_port(ctx_id, 6000, socket_path.as_ptr()) };
346-
if err < 0 {
347-
let err = Errno::from_raw_os_error(-err);
348-
return Err(err).context("Failed to configure vsock for host X11 socket");
349-
}
350-
}
351-
}
352-
}
353-
354333
let username = env::var("USER").context("Failed to get username from environment")?;
355334
let user = User::from_name(&username)
356335
.map_err(Into::into)

crates/muvm/src/guest/mount.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,7 @@ pub fn mount_filesystems(merged_rootfs: bool) -> Result<()> {
315315

316316
// Do this last so it can pick up all the submounts made above.
317317
if let Err(e) = mount_fex_rootfs(merged_rootfs) {
318-
println!(
319-
"Failed to mount FEX rootfs, carrying on without. Error: {e}"
320-
);
318+
println!("Failed to mount FEX rootfs, carrying on without. Error: {e}");
321319
}
322320

323321
Ok(())

0 commit comments

Comments
 (0)