migration: cpr_is_incoming
Define the cpr_is_incoming helper, to be used in several cpr fix patches. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Message-ID: <1741380954-341079-2-git-send-email-steven.sistare@oracle.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
This commit is contained in:
parent
0462a32b4f
commit
1632a2017f
@ -21,6 +21,7 @@ int cpr_find_fd(const char *name, int id);
|
||||
|
||||
MigMode cpr_get_incoming_mode(void);
|
||||
void cpr_set_incoming_mode(MigMode mode);
|
||||
bool cpr_is_incoming(void);
|
||||
|
||||
int cpr_state_save(MigrationChannel *channel, Error **errp);
|
||||
int cpr_state_load(MigrationChannel *channel, Error **errp);
|
||||
|
@ -128,6 +128,11 @@ void cpr_set_incoming_mode(MigMode mode)
|
||||
incoming_mode = mode;
|
||||
}
|
||||
|
||||
bool cpr_is_incoming(void)
|
||||
{
|
||||
return incoming_mode != MIG_MODE_NONE;
|
||||
}
|
||||
|
||||
int cpr_state_save(MigrationChannel *channel, Error **errp)
|
||||
{
|
||||
int ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user