Get the syspath representing this uinput device. The syspath returned is the one of the input node itself (e.g. `/sys/devices/virtual/input/input123`), not the syspath of the device node.
(&mut self)
| 282 | /// The syspath returned is the one of the input node itself (e.g. |
| 283 | /// `/sys/devices/virtual/input/input123`), not the syspath of the device node. |
| 284 | pub fn get_syspath(&mut self) -> io::Result<PathBuf> { |
| 285 | let mut syspath = vec![0u8; 256]; |
| 286 | let len = unsafe { sys::ui_get_sysname(self.fd.as_raw_fd(), &mut syspath)? }; |
| 287 | syspath.truncate(len as usize - 1); |
| 288 | |
| 289 | let syspath = OsStr::from_bytes(&syspath); |
| 290 | |
| 291 | Ok(Path::new(SYSFS_PATH).join(syspath)) |
| 292 | } |
| 293 | |
| 294 | /// Get the syspaths of the corresponding device nodes in /dev/input. |
| 295 | pub fn enumerate_dev_nodes_blocking(&mut self) -> io::Result<DevNodesBlocking> { |
no test coverage detected