From facfa8262ecab062229228b8d3662b391384ebe1 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 3 Nov 2020 11:57:58 +0100 Subject: [PATCH] error: Introduce VIR_ERR_CHECKPOINT_INCONSISTENT error code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This code will be used to signal cases when the checkpoint is broken either during backup or other operations where a user might want to make decision based on the presence of the checkpoint, such as do a full backup instead of an incremental one. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- include/libvirt/virterror.h | 1 + src/util/virerror.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/include/libvirt/virterror.h b/include/libvirt/virterror.h index 0f1c32283d..b96fe250aa 100644 --- a/include/libvirt/virterror.h +++ b/include/libvirt/virterror.h @@ -332,6 +332,7 @@ typedef enum { VIR_ERR_NETWORK_PORT_EXIST = 106, /* the network port already exist */ VIR_ERR_NO_NETWORK_PORT = 107, /* network port not found */ VIR_ERR_NO_HOSTNAME = 108, /* no domain's hostname found */ + VIR_ERR_CHECKPOINT_INCONSISTENT = 109, /* checkpoint can't be used */ # ifdef VIR_ENUM_SENTINELS VIR_ERR_NUMBER_LAST diff --git a/src/util/virerror.c b/src/util/virerror.c index 80a7cfe0ed..9e3bad97eb 100644 --- a/src/util/virerror.c +++ b/src/util/virerror.c @@ -1227,6 +1227,10 @@ static const virErrorMsgTuple virErrorMsgStrings[] = { [VIR_ERR_NO_HOSTNAME] = { N_("no hostname found"), N_("no hostname found: %s") }, + [VIR_ERR_CHECKPOINT_INCONSISTENT] = { + N_("checkpoint inconsistent"), + N_("checkpoint inconsistent: %s") + }, }; G_STATIC_ASSERT(G_N_ELEMENTS(virErrorMsgStrings) == VIR_ERR_NUMBER_LAST);