diff options
| author | Fabiano Rosas <farosas@suse.de> | 2024-02-29 12:30:00 -0300 |
|---|---|---|
| committer | Peter Xu <peterx@redhat.com> | 2024-03-01 15:42:04 +0800 |
| commit | 7f5b50a40181bd75c1f74aeaa7fe94fe10680720 (patch) | |
| tree | 2c786f532a3c0a63c668465795dce28fa331c5cb /migration/qemu-file.h | |
| parent | c05dfcb7f2c5e39fc47c347de305df4e6afb4fa9 (diff) | |
| download | focaccia-qemu-7f5b50a40181bd75c1f74aeaa7fe94fe10680720.tar.gz focaccia-qemu-7f5b50a40181bd75c1f74aeaa7fe94fe10680720.zip | |
migration/qemu-file: add utility methods for working with seekable channels
Add utility methods that will be needed when implementing 'mapped-ram' migration capability. Signed-off-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: "Daniel P. Berrangé" <berrange@redhat.com> Link: https://lore.kernel.org/r/20240229153017.2221-7-farosas@suse.de Signed-off-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'migration/qemu-file.h')
| -rw-r--r-- | migration/qemu-file.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/migration/qemu-file.h b/migration/qemu-file.h index 8aec9fabf7..32fd4a34fd 100644 --- a/migration/qemu-file.h +++ b/migration/qemu-file.h @@ -75,6 +75,12 @@ QEMUFile *qemu_file_get_return_path(QEMUFile *f); int qemu_fflush(QEMUFile *f); void qemu_file_set_blocking(QEMUFile *f, bool block); int qemu_file_get_to_fd(QEMUFile *f, int fd, size_t size); +void qemu_set_offset(QEMUFile *f, off_t off, int whence); +off_t qemu_get_offset(QEMUFile *f); +void qemu_put_buffer_at(QEMUFile *f, const uint8_t *buf, size_t buflen, + off_t pos); +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); |