libnvmf_config_emit_install-libnvme32
Write a configuration to disk.
Usage
int libnvmf_config_emit_install (struct libnvmf_config_emitter *emitter , const char *file , bool force );
Arguments
emitter
|
Configuration emitter. |
|---|---|
file
|
Destination configuration file, or NULL to use the default configuration file. |
force
|
Overwrite an existing configuration if true. |
Overview
The default persona is written to the main configuration file. Each named persona is written to a separate drop-in file.
The generated configuration is validated by reading it back through the standard parser before it is installed. Files are written atomically (temporary file followed by rename). If any step fails, no configuration is installed.
Return
* 0 on success. * -EEXIST if a configuration already exists and force is false. * -EINVAL if emitter is NULL. * A negative errno value on other failures.