From 5f1fdec858062c66738239042ae7acb9f841f899 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Fri, 19 Jul 2024 21:11:02 +0200 Subject: [PATCH] Remove inputd -G Ever since fbcond got moved out of vesad it has been doing the exact same as inputd -A. --- inputd/src/main.rs | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) diff --git a/inputd/src/main.rs b/inputd/src/main.rs index f35f593c08..cb2ee9c021 100644 --- a/inputd/src/main.rs +++ b/inputd/src/main.rs @@ -481,52 +481,6 @@ pub fn main() { if let Some(val) = args.next() { match val.as_ref() { - // Sets the VT mode of the specified VT to [`VtMode::Graphic`]. - "-G" => { - let vt = args.next().unwrap().parse::().unwrap(); - - // On startup, the VESA display driver is started which basically makes use of the framebuffer - // provided by the firmware. The GPU devices are latter started by `pcid` (such as `virtio-gpu`). - let mut devices = vec![]; - let schemes = std::fs::read_dir(":").unwrap(); - - for entry in schemes { - let path = entry.unwrap().path(); - let path_str = path - .into_os_string() - .into_string() - .expect("inputd: failed to convert path to string"); - - if path_str.contains("display") { - println!("inputd: found display scheme {}", path_str); - devices.push(path_str); - } - } - - if devices.is_empty() { - // No display devices found. - return; - } - - let device = devices - .iter() - .filter(|d| !d.contains("vesa")) - .collect::>(); - let device = if device.is_empty() { - "vesa" - } else { - // TODO: What should we do when there are multiple display devices? - device[0][2..].split('.').nth(1).unwrap() - }; - - let mut handle = - inputd::Handle::new(device).expect("inputd: failed to open display handle"); - - handle - .activate(vt, VtMode::Graphic) - .expect("inputd: failed to activate VT in graphic mode"); - } - // Activates a VT. "-A" => { let vt = args.next().unwrap().parse::().unwrap();