libnvmf\_config\_read(9) libnvme API manual libnvmf\_config\_read(9)

# [NAME](#NAME)

libnvmf\_config\_read - read and resolve a connection configuration.

# [SYNOPSIS](#SYNOPSIS)

**int libnvmf\_config\_read** **(struct libnvme\_global\_ctx \*ctx ,** **const char \*file ,** **struct libnvmf\_config \*\*out );**

# [ARGUMENTS](#ARGUMENTS)

[ctx](#ctx)

libnvme global context

[file](#file)

main configuration file, or NULL for the default (/etc/nvme/nvme-fabrics.conf). The drop-in directory is always derived from the file name: the .conf files under &lt;file&gt;.d/.

[out](#out)

the resolved configuration on success; NULL on error

# [DESCRIPTION](#DESCRIPTION)

Reads the main file (if it exists) and the drop-ins (if the directory exists) and resolves them into the flat connection list. An absent configuration is valid and yields an empty list. Any validation error in any file fails the read as a unit; diagnostics carry file:line and are reported through *ctx*.

# [RETURN](#RETURN)

0 on success (\**out* is the resolved configuration), negative errno otherwise (\**out* is NULL).

libnvmf\_config\_read October 2026

---

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