aboutsummaryrefslogtreecommitdiff
path: root/savevm.c
diff options
context:
space:
mode:
Diffstat (limited to 'savevm.c')
-rw-r--r--savevm.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/savevm.c b/savevm.c
index cd833504e2..cb6cd2e436 100644
--- a/savevm.c
+++ b/savevm.c
@@ -224,7 +224,6 @@ QEMUFile *qemu_popen(FILE *popen_file, const char *mode)
} else {
s->file = qemu_fopen_ops(s, popen_put_buffer, NULL, popen_close, NULL);
}
- fprintf(stderr, "qemu_popen: returning result of qemu_fopen_ops\n");
return s->file;
}
@@ -240,6 +239,17 @@ QEMUFile *qemu_popen_cmd(const char *command, const char *mode)
return qemu_popen(popen_file, mode);
}
+int qemu_popen_fd(QEMUFile *f)
+{
+ QEMUFilePopen *p;
+ int fd;
+
+ p = (QEMUFilePopen *)f->opaque;
+ fd = fileno(p->popen_file);
+
+ return fd;
+}
+
QEMUFile *qemu_fopen_socket(int fd)
{
QEMUFileSocket *s = qemu_mallocz(sizeof(QEMUFileSocket));