table of contents
- experimental 3.3-1
| libnvmf_context_set_devid_file(2) | libnvme API manual | libnvmf_context_set_devid_file(2) |
NAME¶
libnvmf_context_set_devid_file - Set devid file for context
SYNOPSIS¶
int libnvmf_context_set_devid_file (struct libnvmf_context *fctx , const char *devid_file );
ARGUMENTS¶
- fctx
- Fabrics context
- devid_file
- Path to the output file
DESCRIPTION¶
Configure a file that libnvmf_connect uses to record the kernel-assigned device name (for example, "nvme0").
If the controller is already connected, the existing device name is written. Otherwise, the device name is written after the controller is connected.
The output file is created before attempting the connection. If the file cannot be created, for example because the parent directory does not exist, libnvmf_connect fails without attempting the connection. A file that libnvmf_connect created and has no device name to write into is removed again, so it never exists empty. An existing file keeps its content unless a device name is written.
This is intended for applications that need to identify the device associated with a connection, for example to disconnect it later.
RETURN¶
0 on success, negative error code otherwise.
| libnvmf_context_set_devid_file | November 2026 |