migration: Move migrate_announce_params() to option.c
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> --- Fix extra whitespace (fabiano)
This commit is contained in:
parent
24155bd052
commit
2682c4eea7
|
@ -954,20 +954,6 @@ MigrationParameters *qmp_query_migrate_parameters(Error **errp)
|
|||
return params;
|
||||
}
|
||||
|
||||
AnnounceParameters *migrate_announce_params(void)
|
||||
{
|
||||
static AnnounceParameters ap;
|
||||
|
||||
MigrationState *s = migrate_get_current();
|
||||
|
||||
ap.initial = s->parameters.announce_initial;
|
||||
ap.max = s->parameters.announce_max;
|
||||
ap.rounds = s->parameters.announce_rounds;
|
||||
ap.step = s->parameters.announce_step;
|
||||
|
||||
return ≈
|
||||
}
|
||||
|
||||
/*
|
||||
* Return true if we're already in the middle of a migration
|
||||
* (i.e. any of the active or setup states)
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "qapi/qapi-commands-migration.h"
|
||||
#include "qapi/qmp/qerror.h"
|
||||
#include "sysemu/runstate.h"
|
||||
#include "migration/misc.h"
|
||||
#include "migration.h"
|
||||
#include "ram.h"
|
||||
#include "options.h"
|
||||
|
@ -589,3 +590,19 @@ uint64_t migrate_xbzrle_cache_size(void)
|
|||
|
||||
return s->parameters.xbzrle_cache_size;
|
||||
}
|
||||
|
||||
/* parameters helpers */
|
||||
|
||||
AnnounceParameters *migrate_announce_params(void)
|
||||
{
|
||||
static AnnounceParameters ap;
|
||||
|
||||
MigrationState *s = migrate_get_current();
|
||||
|
||||
ap.initial = s->parameters.announce_initial;
|
||||
ap.max = s->parameters.announce_max;
|
||||
ap.rounds = s->parameters.announce_rounds;
|
||||
ap.step = s->parameters.announce_step;
|
||||
|
||||
return ≈
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue