]> xenbits.xensource.com Git - qemu-upstream-4.4-testing.git/commitdiff
migration: replace qemu_stdio_fd with qemu_get_fd
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Aug 2012 08:21:26 +0000 (10:21 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 2 Nov 2012 17:35:06 +0000 (18:35 +0100)
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
migration-exec.c
migration-fd.c
qemu-file.h
savevm.c

index 519af57ac7d6fc35bb0373b67f74dc22722c5154..452bf071f13bb1e147d84e8b70b66f3d55bbb825 100644 (file)
@@ -88,7 +88,7 @@ static void exec_accept_incoming_migration(void *opaque)
     QEMUFile *f = opaque;
 
     process_incoming_migration(f);
-    qemu_set_fd_handler2(qemu_stdio_fd(f), NULL, NULL, NULL, NULL);
+    qemu_set_fd_handler2(qemu_get_fd(f), NULL, NULL, NULL, NULL);
     qemu_fclose(f);
 }
 
@@ -103,6 +103,6 @@ void exec_start_incoming_migration(const char *command, Error **errp)
         return;
     }
 
-    qemu_set_fd_handler2(qemu_stdio_fd(f), NULL,
+    qemu_set_fd_handler2(qemu_get_fd(f), NULL,
                         exec_accept_incoming_migration, NULL, f);
 }
index ce6932d7c30324f877c04b5aeb73c74b6e09a63a..b47b222e887049ba0e06cd1d11655427f85383c4 100644 (file)
@@ -93,7 +93,7 @@ static void fd_accept_incoming_migration(void *opaque)
     QEMUFile *f = opaque;
 
     process_incoming_migration(f);
-    qemu_set_fd_handler2(qemu_stdio_fd(f), NULL, NULL, NULL, NULL);
+    qemu_set_fd_handler2(qemu_get_fd(f), NULL, NULL, NULL, NULL);
     qemu_fclose(f);
 }
 
index d552f5d90672f0523fe0c17c8ba5c6892bd8a2d3..d64bdbb19b63ca12b74949de878299573cca6df3 100644 (file)
@@ -80,7 +80,6 @@ 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);
 void qemu_put_byte(QEMUFile *f, int v);
index a58fe9ac495560bfd33b9b1860b2e70ef27c26ba..0ab1ad4afd7d6a8a0648e6ba4954b5a7e7a877fd 100644 (file)
--- a/savevm.c
+++ b/savevm.c
@@ -311,17 +311,6 @@ QEMUFile *qemu_popen_cmd(const char *command, const char *mode)
     return qemu_popen(popen_file, mode);
 }
 
-int qemu_stdio_fd(QEMUFile *f)
-{
-    QEMUFileStdio *p;
-    int fd;
-
-    p = (QEMUFileStdio *)f->opaque;
-    fd = fileno(p->stdio_file);
-
-    return fd;
-}
-
 static const QEMUFileOps stdio_file_read_ops = {
     .get_fd =     stdio_get_fd,
     .get_buffer = stdio_get_buffer,