.TH "libnvme_open" 9 "libnvme_open" "September 2026" "libnvme API manual" LINUX .SH NAME libnvme_open \- Open an nvme controller or namespace device .SH SYNOPSIS .B "int" libnvme_open .BI "(struct libnvme_global_ctx *ctx " "," .BI "const char *name " "," .BI "int flags " "," .BI "struct libnvme_transport_handle **hdl " ");" .SH ARGUMENTS .IP "ctx" 12 struct libnvme_global_ctx object .IP "name" 12 The basename of the device to open .IP "flags" 12 Flags to pass to the underlying open(2) call, e.g. O_RDONLY or O_RDONLY | O_EXCL .IP "hdl" 12 Transport handle to return .SH "DESCRIPTION" This will look for the handle in /dev/ and validate the name and filetype match linux conventions. .SH "RETURN" 0 on success, negative error code otherwise.