tty: Print full path to render node
Browse files at this commit8703feedee755353269306c65cdb78384dcc97e8Parent: a27d2251 changed file +9 -1
- src/backend/tty.rs +9 -1
src/backend/tty.rsmodified+9 -1
| @@ -1,5 +1,6 @@ | |||
| 1 | use std::cell::RefCell; | 1 | use std::cell::RefCell; |
| 2 | use std::collections::{HashMap, HashSet}; | 2 | use std::collections::{HashMap, HashSet}; |
| 3 | +use std::fmt::Write; | ||
| 3 | use std::path::Path; | 4 | use std::path::Path; |
| 4 | use std::rc::Rc; | 5 | use std::rc::Rc; |
| 5 | use std::sync::{Arc, Mutex}; | 6 | use std::sync::{Arc, Mutex}; |
| @@ -195,7 +196,14 @@ impl Tty { | |||
| 195 | .node_with_type(NodeType::Render) | 196 | .node_with_type(NodeType::Render) |
| 196 | .unwrap() | 197 | .unwrap() |
| 197 | .unwrap(); | 198 | .unwrap(); |
| 198 | - info!("using {} as the primary GPU", primary_render_node); | 199 | + |
| 200 | + let mut node_path = String::new(); | ||
| 201 | + if let Some(path) = primary_render_node.dev_path() { | ||
| 202 | + write!(node_path, "{:?}", path).unwrap(); | ||
| 203 | + } else { | ||
| 204 | + write!(node_path, "{}", primary_render_node).unwrap(); | ||
| 205 | + } | ||
| 206 | + info!("using as the render node: {}", node_path); | ||
| 199 | 207 | ||
| 200 | Self { | 208 | Self { |
| 201 | config, | 209 | config, |