libnvme_open-libnvme32
Open an nvme controller or namespace device
Usage
int libnvme_open (struct libnvme_global_ctx *ctx , const char *name , int flags , struct libnvme_transport_handle **hdl );
Arguments
ctx
|
struct libnvme_global_ctx object |
|---|---|
name
|
The basename of the device to open |
flags
|
Flags to pass to the underlying open(2) call, e.g. O_RDONLY or O_RDONLY | O_EXCL |
hdl
|
Transport handle to return |
Overview
This will look for the handle in /dev/ and validate the name and filetype match linux conventions.
Return
0 on success, negative error code otherwise.