From 0540f189d63dbb25a9ff5095fae279bdf67f68d5 Mon Sep 17 00:00:00 2001 From: Vasiliy Stelmachenok Date: Wed, 21 Aug 2024 10:46:47 +0300 Subject: [PATCH] chwd: Remove --pci parameter Right now we don't handle any devices other than PCI by default, so it's useless. --- src/args.rs | 4 ---- src/console_writer.rs | 6 +++--- src/main.rs | 4 ---- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/args.rs b/src/args.rs index f4c0a56..e6b2b94 100644 --- a/src/args.rs +++ b/src/args.rs @@ -21,10 +21,6 @@ use clap::Parser; #[derive(Parser, Debug)] #[command(author, version, about, long_about = None)] pub struct Args { - /// Show PCI - #[arg(long = "pci")] - pub show_pci: bool, - /// Install profile #[arg(short, long, value_name = "profile", conflicts_with("remove"))] pub install: Option, diff --git a/src/console_writer.rs b/src/console_writer.rs index 61f07c5..fca1deb 100644 --- a/src/console_writer.rs +++ b/src/console_writer.rs @@ -31,7 +31,7 @@ pub fn handle_arguments_listing(data: &Data, args: &crate::args::Args) { } // List all profiles - if args.list_all && args.show_pci { + if args.list_all { let all_pci_profiles = &data.all_pci_profiles; if !all_pci_profiles.is_empty() { list_profiles(all_pci_profiles, &fl!("all-pci-profiles")); @@ -41,7 +41,7 @@ pub fn handle_arguments_listing(data: &Data, args: &crate::args::Args) { } // List installed profiles - if args.list_installed && args.show_pci { + if args.list_installed { let installed_pci_profiles = &data.installed_pci_profiles; if args.detail { print_installed_profiles("PCI", installed_pci_profiles); @@ -53,7 +53,7 @@ pub fn handle_arguments_listing(data: &Data, args: &crate::args::Args) { } // List available profiles - if args.list_available && args.show_pci { + if args.list_available { let pci_devices = &data.pci_devices; if args.detail { crate::device::print_available_profiles_in_detail("PCI", pci_devices); diff --git a/src/main.rs b/src/main.rs index f3dc152..85a3261 100644 --- a/src/main.rs +++ b/src/main.rs @@ -68,10 +68,6 @@ fn main() -> anyhow::Result<()> { autoconf_class_id = class_id.to_lowercase(); } - if !argstruct.show_pci { - argstruct.show_pci = true; - } - // 2) Initialize let mut data_obj = data::Data::new(argstruct.is_ai_sdk);