libnvmf\_registry\_retrieve(9) libnvme API manual libnvmf\_registry\_retrieve(9)

# [NAME](#NAME)

libnvmf\_registry\_retrieve - Read an attribute from a controller's registry entry

# [SYNOPSIS](#SYNOPSIS)

**int libnvmf\_registry\_retrieve** **(struct libnvme\_global\_ctx \*ctx ,** **const char \*device ,** **const char \*attr ,** **char \*\*value );**

# [ARGUMENTS](#ARGUMENTS)

[ctx](#ctx)

libnvme global context; must not be NULL

[device](#device)

Kernel device name (e.g. "nvme3")

[attr](#attr)

Attribute name to retrieve (e.g. "owner")

[value](#value)

On success, set to a newly allocated string with the attribute value. The caller must free this string.

# [RETURN](#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.

libnvmf\_registry\_retrieve October 2026

---

Document: libnvmf_registry_retrieve-libnvme3(2) from nvme-cli 3.2-r0 (Chainguard OS)
Source: https://github.com/linux-nvme/nvme-cli
