OS Manuals

libnvmf_registry_device_for_each-libnvme3(2)

libnvmf_registry_device_for_each - Iterate over live controller registry entries

libnvmf_registry_device_for_each(9) libnvme API manual libnvmf_registry_device_for_each(9)

libnvmf_registry_device_for_each - Iterate over live controller registry entries

int libnvmf_registry_device_for_each (struct libnvme_global_ctx *ctx , int (*callback)(const char *device, void *user_data) , void *user_data );

libnvme global context; must not be NULL
Callback invoked for each live entry
User data passed to callback

Scans the registry directory and invokes callback for each entry whose corresponding /dev/nvmeN device node exists. Stale entries left behind after a controller is removed are silently skipped. The existence check is advisory: a device may be removed between the check and callback invocation; callers should handle ENOENT gracefully.

0 on success, negative errno if the registry directory cannot be opened. Returns 0 when the directory does not exist (nothing registered).

libnvmf_registry_device_for_each October 2026

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