Further clean up the single-queue error message.

This commit is contained in:
Herbert Wolverson 2023-10-13 15:33:52 +00:00
parent d2a3a89494
commit 2098baa38b

View File

@ -103,7 +103,7 @@ fn sorted_txq_xps_cpus(interface: &str) -> Result<Vec<String>> {
let mut result = Vec::new(); let mut result = Vec::new();
let paths = let paths =
std::fs::read_dir(&format!("/sys/class/net/{interface}/queues/")) std::fs::read_dir(&format!("/sys/class/net/{interface}/queues/"))
.map_err(|_| anyhow::anyhow!("/sys/class/net/interface/queues does not exist. Does this card only support one queue (not supported)?"))?; .map_err(|_| anyhow::anyhow!("/sys/class/net/{interface}/queues/ does not exist. Does this card only support one queue (not supported)?"))?;
for path in paths { for path in paths {
if let Ok(path) = &path { if let Ok(path) = &path {
if path.path().is_dir() { if path.path().is_dir() {