libnvme-sys 0.6.2

Raw FFI bindings to the Linux libnvme C library (use `libnvme` for the safe wrapper)
Documentation
1
2
3
4
5
6
7
8
9
10
11
use libnvme_sys::{nvme_free_tree, nvme_scan};

fn main() {
    let root = unsafe { nvme_scan(std::ptr::null()) };
    if root.is_null() {
        eprintln!("nvme_scan returned NULL");
        std::process::exit(1);
    }
    println!("nvme_scan returned root={root:p}");
    unsafe { nvme_free_tree(root) };
}