Skip to content

Commit

Permalink
chwd: Remove is_nvidia_card option
Browse files Browse the repository at this point in the history
This is easily replaced by ``lspci -d "10de:*:30x"``.
  • Loading branch information
ventureoo committed Aug 20, 2024
1 parent fbcd093 commit 1edbbd1
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 26 deletions.
4 changes: 0 additions & 4 deletions src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ pub struct Args {
#[arg(short, long, value_name = "classid", conflicts_with_all(["install", "remove"]))]
pub autoconfigure: Option<Vec<String>>,

/// Print if nvidia card found
#[arg(long = "is_nvidia_card")]
pub is_nvidia_card: bool,

/// Toggle AI SDK profiles
#[arg(long = "ai_sdk")]
pub is_ai_sdk: bool,
Expand Down
5 changes: 0 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ fn main() -> anyhow::Result<()> {
argstruct.list_available = true;
}

if argstruct.is_nvidia_card {
misc::check_nvidia_card();
return Ok(());
}

let mut working_profiles: Vec<String> = vec![];

let mut autoconf_class_id = String::new();
Expand Down
18 changes: 1 addition & 17 deletions src/misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use std::path::Path;
use std::sync::Arc;

use crate::profile::Profile;
use crate::{consts, data};
use crate::consts;

#[derive(Debug, PartialEq)]
pub enum Transaction {
Expand Down Expand Up @@ -62,22 +62,6 @@ pub fn find_profile(profile_name: &str, profiles: &[Profile]) -> Option<Arc<Prof
None
}

pub fn check_nvidia_card() {
let data = data::Data::new(false);
for pci_device in data.pci_devices.iter() {
if pci_device.available_profiles.is_empty() {
continue;
}

if pci_device.vendor_id == "10de"
&& pci_device.available_profiles.first().is_some()
{
println!("NVIDIA card found!");
return;
}
}
}

pub fn check_environment() -> Vec<String> {
let mut missing_dirs = vec![];

Expand Down

0 comments on commit 1edbbd1

Please sign in to comment.