mirror of https://gitee.com/openkylin/qemu.git
Add QemuFileWritevBuffer QemuFileOps
This will allow us to write an iovec Signed-off-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
5cc11c46cf
commit
d913829f0f
|
@ -51,11 +51,18 @@ typedef int (QEMUFileCloseFunc)(void *opaque);
|
||||||
*/
|
*/
|
||||||
typedef int (QEMUFileGetFD)(void *opaque);
|
typedef int (QEMUFileGetFD)(void *opaque);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This function writes an iovec to file.
|
||||||
|
*/
|
||||||
|
typedef ssize_t (QEMUFileWritevBufferFunc)(void *opaque, struct iovec *iov,
|
||||||
|
int iovcnt);
|
||||||
|
|
||||||
typedef struct QEMUFileOps {
|
typedef struct QEMUFileOps {
|
||||||
QEMUFilePutBufferFunc *put_buffer;
|
QEMUFilePutBufferFunc *put_buffer;
|
||||||
QEMUFileGetBufferFunc *get_buffer;
|
QEMUFileGetBufferFunc *get_buffer;
|
||||||
QEMUFileCloseFunc *close;
|
QEMUFileCloseFunc *close;
|
||||||
QEMUFileGetFD *get_fd;
|
QEMUFileGetFD *get_fd;
|
||||||
|
QEMUFileWritevBufferFunc *writev_buffer;
|
||||||
} QEMUFileOps;
|
} QEMUFileOps;
|
||||||
|
|
||||||
QEMUFile *qemu_fopen_ops(void *opaque, const QEMUFileOps *ops);
|
QEMUFile *qemu_fopen_ops(void *opaque, const QEMUFileOps *ops);
|
||||||
|
|
Loading…
Reference in New Issue