libnvmf_registry_retrieve-libnvme32
Read an attribute from a controller's registry entry
Usage
int libnvmf_registry_retrieve
(struct
libnvme_global_ctx
*ctx
,
const
char
*device
,
const
char
*attr
,
char
**value
);
Arguments
- ctx
-
libnvme global context; must not be NULL
- device
-
Kernel device name (e.g. "nvme3")
- attr
-
Attribute name to retrieve (e.g. "owner")
- value
-
On success, set to a newly allocated string with the attribute value. The caller must free this string.
Return
0 on success, -ENOENT if the controller is not registered or the attribute is not present, -ENOMEM on allocation failure, negative errno from underlying system calls otherwise.