aboutsummaryrefslogtreecommitdiff
path: root/savevm.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-12-23 00:39:34 +0100
committerAndreas Färber <afaerber@suse.de>2012-12-23 00:40:49 +0100
commit501a7ce7270955be151c442c27620fa7af2f3ce5 (patch)
tree0374e4d581a0246074d55712b81baf01f3c439b6 /savevm.c
parent62e0c095450f6a7eb37914991f3f7966aa4da7a1 (diff)
parent36f25d2537c40c6c47f4abee5d31a24863d1adf7 (diff)
downloadqemu-501a7ce7270955be151c442c27620fa7af2f3ce5.zip
qemu-501a7ce7270955be151c442c27620fa7af2f3ce5.tar.gz
qemu-501a7ce7270955be151c442c27620fa7af2f3ce5.tar.bz2
Merge branch 'master' of git://git.qemu.org/qemu into qom-cpu
Adapt header include paths. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'savevm.c')
-rw-r--r--savevm.c47
1 files changed, 30 insertions, 17 deletions
diff --git a/savevm.c b/savevm.c
index 5d04d59..bcdb92e 100644
--- a/savevm.c
+++ b/savevm.c
@@ -72,21 +72,20 @@
#include "qemu-common.h"
#include "hw/hw.h"
#include "hw/qdev.h"
-#include "net.h"
-#include "monitor.h"
-#include "sysemu.h"
-#include "qemu-timer.h"
-#include "qemu-char.h"
+#include "net/net.h"
+#include "monitor/monitor.h"
+#include "sysemu/sysemu.h"
+#include "qemu/timer.h"
#include "audio/audio.h"
-#include "migration.h"
-#include "qemu_socket.h"
-#include "qemu-queue.h"
-#include "qemu-timer.h"
-#include "cpus.h"
-#include "memory.h"
+#include "migration/migration.h"
+#include "qemu/sockets.h"
+#include "qemu/queue.h"
+#include "qemu/timer.h"
+#include "sysemu/cpus.h"
+#include "exec/memory.h"
#include "qmp-commands.h"
#include "trace.h"
-#include "bitops.h"
+#include "qemu/bitops.h"
#define SELF_ANNOUNCE_ROUNDS 5
@@ -556,11 +555,6 @@ int qemu_fclose(QEMUFile *f)
return ret;
}
-int qemu_file_put_notify(QEMUFile *f)
-{
- return f->ops->put_buffer(f->opaque, NULL, 0, 0);
-}
-
void qemu_put_buffer(QEMUFile *f, const uint8_t *buf, int size)
{
int l;
@@ -1759,6 +1753,25 @@ int qemu_savevm_state_complete(QEMUFile *f)
return qemu_file_get_error(f);
}
+uint64_t qemu_savevm_state_pending(QEMUFile *f, uint64_t max_size)
+{
+ SaveStateEntry *se;
+ uint64_t ret = 0;
+
+ QTAILQ_FOREACH(se, &savevm_handlers, entry) {
+ if (!se->ops || !se->ops->save_live_pending) {
+ continue;
+ }
+ if (se->ops && se->ops->is_active) {
+ if (!se->ops->is_active(se->opaque)) {
+ continue;
+ }
+ }
+ ret += se->ops->save_live_pending(f, se->opaque, max_size);
+ }
+ return ret;
+}
+
void qemu_savevm_state_cancel(QEMUFile *f)
{
SaveStateEntry *se;