Skip to content

Commit

Permalink
Add QemuFileWritevBuffer QemuFileOps
Browse files Browse the repository at this point in the history
This will allow us to write an iovec

Signed-off-by: Orit Wasserman <[email protected]>
Reviewed-by: Juan Quintela <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
  • Loading branch information
oritwas authored and Juan Quintela committed Mar 26, 2013
1 parent 5cc11c4 commit d913829
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/migration/qemu-file.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,18 @@ typedef int (QEMUFileCloseFunc)(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 {
QEMUFilePutBufferFunc *put_buffer;
QEMUFileGetBufferFunc *get_buffer;
QEMUFileCloseFunc *close;
QEMUFileGetFD *get_fd;
QEMUFileWritevBufferFunc *writev_buffer;
} QEMUFileOps;

QEMUFile *qemu_fopen_ops(void *opaque, const QEMUFileOps *ops);
Expand Down

0 comments on commit d913829

Please sign in to comment.