NAME
libnvmf_config_read - read and resolve a connection configuration.
SYNOPSIS
int libnvmf_config_read (struct libnvme_global_ctx *ctx , const char *file , struct libnvmf_config **out );
ARGUMENTS
- ctx
-
libnvme global context
- 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 <file>.d/.
- out
-
the resolved configuration on success; NULL on error
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
0 on success (*out is the resolved configuration), negative errno otherwise (*out is NULL).