diff options
| author | Steve Sistare <steven.sistare@oracle.com> | 2025-01-15 11:00:39 -0800 |
|---|---|---|
| committer | Fabiano Rosas <farosas@suse.de> | 2025-01-29 11:43:05 -0300 |
| commit | b5779dc7cfbb53583da362da5906733f6cba4c3f (patch) | |
| tree | 425306228f4bb5a1c4b8423788ee4e74ed8b6375 /migration/qemu-file.h | |
| parent | 2862b6b92467241e3ed378876cc8dbf2e6a8ea6a (diff) | |
| download | focaccia-qemu-b5779dc7cfbb53583da362da5906733f6cba4c3f.tar.gz focaccia-qemu-b5779dc7cfbb53583da362da5906733f6cba4c3f.zip | |
migration: SCM_RIGHTS for QEMUFile
Define functions to put/get file descriptors to/from a QEMUFile, for qio channels that support SCM_RIGHTS. Maintain ordering such that put(A), put(fd), put(B) followed by get(A), get(fd), get(B) always succeeds. Other get orderings may succeed but are not guaranteed. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Peter Xu <peterx@redhat.com> Link: https://lore.kernel.org/r/1736967650-129648-14-git-send-email-steven.sistare@oracle.com Signed-off-by: Fabiano Rosas <farosas@suse.de>
Diffstat (limited to 'migration/qemu-file.h')
| -rw-r--r-- | migration/qemu-file.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/migration/qemu-file.h b/migration/qemu-file.h index 11c2120edd..3e47a20621 100644 --- a/migration/qemu-file.h +++ b/migration/qemu-file.h @@ -79,5 +79,7 @@ size_t qemu_get_buffer_at(QEMUFile *f, const uint8_t *buf, size_t buflen, off_t pos); QIOChannel *qemu_file_get_ioc(QEMUFile *file); +int qemu_file_put_fd(QEMUFile *f, int fd); +int qemu_file_get_fd(QEMUFile *f); #endif |