[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] register_savevm etc.: make save function optional
From: |
Ian Jackson |
Subject: |
[Qemu-devel] [PATCH] register_savevm etc.: make save function optional |
Date: |
Fri, 16 May 2008 17:06:58 +0100 |
register_savevm etc.: make save function optional
This allows a device to provide only a loading function, not a saving
function.
This is useful if a later version of an emulation restores its state
in some other way (eg by having a different device name, or by
exploiting invariants in the state); when this happens it is still
necessary to load or skip the information when it is found in old
savefiles.
Signed-off-by: Ian Jackson <address@hidden>
diff --git a/vl.c b/vl.c
index 67712f0..3a9135c 100644
--- a/vl.c
+++ b/vl.c
@@ -5988,6 +5988,10 @@ static int qemu_savevm_state(QEMUFile *f)
qemu_put_be64(f, 0); /* total size */
for(se = first_se; se != NULL; se = se->next) {
+ if (se->save_state == NULL)
+ /* this one has a loader only, for backwards compatibility */
+ continue;
+
/* ID string */
len = strlen(se->idstr);
qemu_put_byte(f, len);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] register_savevm etc.: make save function optional,
Ian Jackson <=