aboutsummaryrefslogtreecommitdiff
path: root/qemu-file.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-08-08 10:20:18 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-11-02 18:34:59 +0100
commit70eb6330343ebc61e5fb22be3d137df40f4bb058 (patch)
tree89eb7025e8d55fe6497a754ae75e8b053d6d7193 /qemu-file.h
parent9229bf3c2d7afcd1adce7258843d9bc82b066b08 (diff)
migration: add qemu_get_fd
Reviewed-by: Orit Wasserman <owasserm@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qemu-file.h')
-rw-r--r--qemu-file.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/qemu-file.h b/qemu-file.h
index c89e8e09dc..d552f5d906 100644
--- a/qemu-file.h
+++ b/qemu-file.h
@@ -47,6 +47,10 @@ typedef int (QEMUFileGetBufferFunc)(void *opaque, uint8_t *buf,
*/
typedef int (QEMUFileCloseFunc)(void *opaque);
+/* Called to return the OS file descriptor associated to the QEMUFile.
+ */
+typedef int (QEMUFileGetFD)(void *opaque);
+
/* Called to determine if the file has exceeded its bandwidth allocation. The
* bandwidth capping is a soft limit, not a hard limit.
*/
@@ -63,6 +67,7 @@ typedef struct QEMUFileOps {
QEMUFilePutBufferFunc *put_buffer;
QEMUFileGetBufferFunc *get_buffer;
QEMUFileCloseFunc *close;
+ QEMUFileGetFD *get_fd;
QEMUFileRateLimit *rate_limit;
QEMUFileSetRateLimit *set_rate_limit;
QEMUFileGetRateLimit *get_rate_limit;
@@ -74,6 +79,7 @@ QEMUFile *qemu_fdopen(int fd, const char *mode);
QEMUFile *qemu_fopen_socket(int fd);
QEMUFile *qemu_popen(FILE *popen_file, const char *mode);
QEMUFile *qemu_popen_cmd(const char *command, const char *mode);
+int qemu_get_fd(QEMUFile *f);
int qemu_stdio_fd(QEMUFile *f);
int qemu_fclose(QEMUFile *f);
void qemu_put_buffer(QEMUFile *f, const uint8_t *buf, int size);