diff options
author | Pavel Hrdina <phrdina@redhat.com> | 2015-04-28 19:24:07 +0200 |
---|---|---|
committer | Pavel Hrdina <phrdina@redhat.com> | 2015-05-04 09:20:01 +0200 |
commit | 6e3f9cbc9c9c17bfab5a19631dc914748bdb4aec (patch) | |
tree | a097a690830f00be320d14ff855740cf7f822491 /src/libvirt-domain-snapshot.c | |
parent | ff3f93bcc2192736f900c6efc35e052324712252 (diff) | |
download | libvirt-6e3f9cbc9c9c17bfab5a19631dc914748bdb4aec.tar.gz |
use new macro helpers to check flag requirements
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Diffstat (limited to 'src/libvirt-domain-snapshot.c')
-rw-r--r-- | src/libvirt-domain-snapshot.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/libvirt-domain-snapshot.c b/src/libvirt-domain-snapshot.c index 9685c353e7..4625e03842 100644 --- a/src/libvirt-domain-snapshot.c +++ b/src/libvirt-domain-snapshot.c @@ -221,12 +221,9 @@ virDomainSnapshotCreateXML(virDomainPtr domain, virCheckNonNullArgGoto(xmlDesc, error); virCheckReadOnlyGoto(conn->flags, error); - if ((flags & VIR_DOMAIN_SNAPSHOT_CREATE_CURRENT) && - !(flags & VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE)) { - virReportInvalidArg(flags, "%s", - _("use of 'current' flag in requires 'redefine' flag")); - goto error; - } + VIR_REQUIRE_FLAG_GOTO(VIR_DOMAIN_SNAPSHOT_CREATE_CURRENT, + VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE, + error); VIR_EXCLUSIVE_FLAGS_GOTO(VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE, VIR_DOMAIN_SNAPSHOT_CREATE_NO_METADATA, |