| libnvmf_connect_args_emit(9) | libnvme API manual | libnvmf_connect_args_emit(9) |
NAME
libnvmf_connect_args_emit - render a connection as "nvme connect" options.
SYNOPSIS
int libnvmf_connect_args_emit (const struct libnvmf_tid *tid , const struct libnvmf_params *params , void (*callback)(const char *arg, void *user_data) , void *user_data );
ARGUMENTS
DESCRIPTION
Emits the TID's set fields first, in fixed order (--transport, --traddr, --trsvcid, --nqn, --host-traddr, --host-iface, --hostnqn, --hostid), then the parameters in their iteration order. Unset and reset parameters are skipped so the kernel default applies; a boolean parameter is emitted as a bare "--flag" when true and skipped when false. Consumer-private options are the caller's to append.
This is the consumption path for the resolved configuration: each connection becomes the option list of one "nvme connect" invocation. It also renders a connection as a human-readable, copy-pasteable command line for "config show" style output.
RETURN
0 on success, -EINVAL when callback is NULL, -ENOMEM when formatting an option fails (the emission stops there).
| libnvmf_connect_args_emit | October 2026 |