diff options
author | Peter Xu <peterx@redhat.com> | 2019-10-16 10:29:30 +0800 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2020-01-20 09:10:23 +0100 |
commit | 1df2c9a26fcb2fa32d099f8e9adcdae4207872e3 (patch) | |
tree | 1a970b94d94b70bad869dd4103961e2c7cd76b60 /include | |
parent | 8bba004ccabd0d71e8b5ca056e576d2737c17305 (diff) |
migration: Define VMSTATE_INSTANCE_ID_ANY
Define the new macro VMSTATE_INSTANCE_ID_ANY for callers who wants to
auto-generate the vmstate instance ID. Previously it was hard coded
as -1 instead of this macro. It helps to change this default value in
the follow up patches. No functional change.
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/migration/vmstate.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 4aef72c426..ed74dd5624 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -1157,6 +1157,8 @@ int vmstate_save_state_v(QEMUFile *f, const VMStateDescription *vmsd, bool vmstate_save_needed(const VMStateDescription *vmsd, void *opaque); +#define VMSTATE_INSTANCE_ID_ANY -1 + /* Returns: 0 on success, -1 on failure */ int vmstate_register_with_alias_id(VMStateIf *obj, int instance_id, const VMStateDescription *vmsd, |