| 1 |
.TH "nvme_ctrl_get_fd" 9 "nvme_ctrl_get_fd" "November 2025" "libnvme API manual" LINUX |
| 2 |
.SH NAME |
| 3 |
nvme_ctrl_get_fd \- Get associated file descriptor |
| 4 |
.SH SYNOPSIS |
| 5 |
.B "int" nvme_ctrl_get_fd |
| 6 |
.BI "(nvme_ctrl_t c " ");" |
| 7 |
.SH ARGUMENTS |
| 8 |
.IP "c" 12 |
| 9 |
Controller instance |
| 10 |
.SH "DESCRIPTION" |
| 11 |
libnvme will \fBopen\fP the file (if not already opened) and keep |
| 12 |
an internal copy of the file descriptor. Following calls to |
| 13 |
this API retrieve the internal cached copy of the file |
| 14 |
descriptor. The file will remain opened and the fd will |
| 15 |
remain cached until the controller object is deleted or |
| 16 |
\fBnvme_ctrl_release_fd\fP is called. |
| 17 |
.SH "RETURN" |
| 18 |
File descriptor associated with \fIc\fP or -1 |