Skip to main content

nvme_ctrl_get_fd

Function nvme_ctrl_get_fd 

Source
pub unsafe extern "C" fn nvme_ctrl_get_fd(c: nvme_ctrl_t) -> c_int
Expand description

nvme_ctrl_get_fd() - Get associated file descriptor @c: Controller instance

libnvme will open() the file (if not already opened) and keep an internal copy of the file descriptor. Following calls to this API retrieve the internal cached copy of the file descriptor. The file will remain opened and the fd will remain cached until the controller object is deleted or nvme_ctrl_release_fd() is called.

Return: File descriptor associated with @c or -1