Skip to content

Commit

Permalink
chwd: Remove --pci parameter
Browse files Browse the repository at this point in the history
Right now we don't handle any devices other than PCI by default, so it's
useless.
  • Loading branch information
ventureoo committed Aug 21, 2024
1 parent 7e62b18 commit 0540f18
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
4 changes: 0 additions & 4 deletions src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>,
Expand Down
6 changes: 3 additions & 3 deletions src/console_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand All @@ -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);
Expand All @@ -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);
Expand Down
4 changes: 0 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 0540f18

Please sign in to comment.