OS Manuals

libnvmf_registry_attr_for_each-libnvme3(2)

libnvmf_registry_attr_for_each - Iterate over attributes in a controller's registry entry

libnvmf_registry_attr_for_each(9) libnvme API manual libnvmf_registry_attr_for_each(9)

libnvmf_registry_attr_for_each - Iterate over attributes in a controller's registry entry

int libnvmf_registry_attr_for_each (struct libnvme_global_ctx *ctx , const char *device , void (*callback)(const char *attr, const char *value, void *user_data) , void *user_data );

libnvme global context; must not be NULL
Kernel device name (e.g. "nvme3")
Callback invoked for each attribute
User data passed to callback

Opens the registry directory for device and invokes callback for each attribute file found. Attribute files that disappear during iteration (e.g. because the device is removed concurrently) are silently skipped.

0 on success, -ENOENT if the device directory does not exist at the time of the initial open, negative errno otherwise.

libnvmf_registry_attr_for_each October 2026

nvme-cli 3.2-r0 · os · ingested 2026-10-31