Function cxl_rs::get_sysfs_node_hex [−][src]
pub fn get_sysfs_node_hex(path: &str, node: &str) -> Result<u64, Error>
Expand description
Returns the parsed hex value from 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 pmem_size: u64 = cxl_rs::get_sysfs_node_hex(cxl_dev, "pmem/size")?;