mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
migration: introduce a new QEMUFile impl based on QIOChannel
Introduce a new QEMUFile implementation that is based on the QIOChannel objects. This impl is different from existing impls in that there is no file descriptor that can be made available, as some channels may be based on higher level protocols such as TLS. Although the QIOChannel based implementation can trivially provide a bi-directional stream, initially we have separate functions for opening input & output directions to fit with the expectation of the current QEMUFile interface. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-Id: <1461751518-12128-9-git-send-email-berrange@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
This commit is contained in:
committed by
Amit Shah
parent
9e4d2b98ee
commit
a9cfeb33bb
@@ -23,7 +23,9 @@
|
||||
*/
|
||||
#ifndef QEMU_FILE_H
|
||||
#define QEMU_FILE_H 1
|
||||
#include "qemu-common.h"
|
||||
#include "exec/cpu-common.h"
|
||||
#include "io/channel.h"
|
||||
|
||||
|
||||
/* This function writes a chunk of data to a file at the given position.
|
||||
@@ -135,6 +137,8 @@ QEMUFile *qemu_fopen_ops(void *opaque, const QEMUFileOps *ops);
|
||||
QEMUFile *qemu_fopen(const char *filename, const char *mode);
|
||||
QEMUFile *qemu_fdopen(int fd, const char *mode);
|
||||
QEMUFile *qemu_fopen_socket(int fd, const char *mode);
|
||||
QEMUFile *qemu_fopen_channel_input(QIOChannel *ioc);
|
||||
QEMUFile *qemu_fopen_channel_output(QIOChannel *ioc);
|
||||
QEMUFile *qemu_popen_cmd(const char *command, const char *mode);
|
||||
QEMUFile *qemu_bufopen(const char *mode, QEMUSizedBuffer *input);
|
||||
void qemu_file_set_hooks(QEMUFile *f, const QEMUFileHooks *hooks);
|
||||
|
||||
Reference in New Issue
Block a user