Fix name prefix of VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE

The enum constant names should all have a prefix that matches the enum
name. VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE was missing the "CREATE_"
part of the name prefix.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2020-11-09 16:14:53 +00:00
parent c8583f9cc0
commit 2a917e6756
4 changed files with 7 additions and 7 deletions

View File

@ -57,8 +57,8 @@ typedef enum {
quiesce all mounted
file systems within
the domain */
VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE = (1 << 2), /* validate disk data state
when redefining a checkpoint */
VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE_VALIDATE = (1 << 2), /* validate disk data state
when redefining a checkpoint */
} virDomainCheckpointCreateFlags;
/* Create a checkpoint using the current VM state. */

View File

@ -125,7 +125,7 @@ virDomainCheckpointGetConnect(virDomainCheckpointPtr checkpoint)
* has a way to resupply correct defaults). Not all hypervisors support
* this flag.
*
* If @flags includes VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE along with
* If @flags includes VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE_VALIDATE along with
* VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE the state of the metadata related
* to the disk state of the redefined checkpoint is validated. Note that
* hypervisors may require that the @domain is running to perform validation.
@ -160,7 +160,7 @@ virDomainCheckpointCreateXML(virDomainPtr domain,
VIR_DOMAIN_CHECKPOINT_CREATE_QUIESCE,
error);
VIR_REQUIRE_FLAG_GOTO(VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE,
VIR_REQUIRE_FLAG_GOTO(VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE_VALIDATE,
VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE,
error);

View File

@ -538,13 +538,13 @@ qemuCheckpointCreateXML(virDomainPtr domain,
virDomainCheckpointPtr checkpoint = NULL;
bool update_current = true;
bool redefine = flags & VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE;
bool validate_bitmaps = flags & VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE;
bool validate_bitmaps = flags & VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE_VALIDATE;
unsigned int parse_flags = 0;
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
g_autoptr(virDomainCheckpointDef) def = NULL;
virCheckFlags(VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE |
VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE, NULL);
VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE_VALIDATE, NULL);
if (redefine) {
parse_flags |= VIR_DOMAIN_CHECKPOINT_PARSE_REDEFINE;

View File

@ -125,7 +125,7 @@ cmdCheckpointCreate(vshControl *ctl,
if (vshCommandOptBool(cmd, "redefine"))
flags |= VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE;
if (vshCommandOptBool(cmd, "redefine-validate"))
flags |= VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE;
flags |= VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE_VALIDATE;
if (vshCommandOptBool(cmd, "quiesce"))
flags |= VIR_DOMAIN_CHECKPOINT_CREATE_QUIESCE;