From 1df2c9a26fcb2fa32d099f8e9adcdae4207872e3 Mon Sep 17 00:00:00 2001 From: Peter Xu Date: Wed, 16 Oct 2019 10:29:30 +0800 Subject: 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 Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- include/migration/vmstate.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') 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, -- cgit v1.2.3