mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 19:41:16 +00:00
conf: Introduce virDomainObjIsFailedPostcopy helper
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
6ca0ff90ac
commit
efe95fb878
@ -29239,6 +29239,16 @@ virDomainObjGetState(virDomainObj *dom, int *reason)
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
virDomainObjIsFailedPostcopy(virDomainObj *dom)
|
||||
{
|
||||
return ((dom->state.state == VIR_DOMAIN_PAUSED &&
|
||||
dom->state.reason == VIR_DOMAIN_PAUSED_POSTCOPY_FAILED) ||
|
||||
(dom->state.state == VIR_DOMAIN_RUNNING &&
|
||||
dom->state.reason == VIR_DOMAIN_RUNNING_POSTCOPY_FAILED));
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
virDomainObjSetState(virDomainObj *dom, virDomainState state, int reason)
|
||||
{
|
||||
|
@ -3886,6 +3886,10 @@ virDomainState
|
||||
virDomainObjGetState(virDomainObj *obj, int *reason)
|
||||
ATTRIBUTE_NONNULL(1);
|
||||
|
||||
bool
|
||||
virDomainObjIsFailedPostcopy(virDomainObj *obj)
|
||||
ATTRIBUTE_NONNULL(1);
|
||||
|
||||
virSecurityLabelDef *
|
||||
virDomainDefGetSecurityLabelDef(const virDomainDef *def, const char *model);
|
||||
|
||||
|
@ -577,6 +577,7 @@ virDomainObjGetOneDef;
|
||||
virDomainObjGetOneDefState;
|
||||
virDomainObjGetPersistentDef;
|
||||
virDomainObjGetState;
|
||||
virDomainObjIsFailedPostcopy;
|
||||
virDomainObjNew;
|
||||
virDomainObjParseFile;
|
||||
virDomainObjParseNode;
|
||||
|
Loading…
Reference in New Issue
Block a user