Function cxl_rs::get_sysfs_node [−][src]
pub fn get_sysfs_node(path: &str, node: &str) -> Result<String, Error>
Expand description
Returns the contents of a sysfs node
Arguments
path
- Top level directory of a CXL sysfs node.node
- Specific node without the directory @path.
Examples
let cxl_dev = "/sys/devices/pci0000:34/0000:34:00.0/0000:35:00.0/mem0"; let fw_version: String = cxl_rs::get_sysfs_node(cxl_dev, "firmware_version").unwrap();