aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2013-07-02 11:07:15 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2013-07-02 11:07:15 +0200
commitb31725d0ae0539f2d13a2454849de557fe91c4fb (patch)
tree3cbcfaada657d781b919ebe7e9ddbf399dd70f25
parentbdf0594aa8064bc08623bc56f934aa0dd44d9220 (diff)
downloadlvm2-b31725d0ae0539f2d13a2454849de557fe91c4fb.tar.gz
archive: add missing bit set
In the last update not all code paths have set the archived flag. If we run in test mode or without archiving enabled - set the bit as well - so test whether archiving has been called succesfully will be ok. (in relase fix).
-rw-r--r--lib/format_text/archiver.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/format_text/archiver.c b/lib/format_text/archiver.c
index c012c8fd7..1e6dbacdd 100644
--- a/lib/format_text/archiver.c
+++ b/lib/format_text/archiver.c
@@ -113,10 +113,13 @@ int archive(struct volume_group *vg)
if (vg_is_archived(vg))
return 1; /* VG has been already archived */
- if (!vg->cmd->archive_params->enabled || !vg->cmd->archive_params->dir)
+ if (!vg->cmd->archive_params->enabled || !vg->cmd->archive_params->dir) {
+ vg->status |= ARCHIVED_VG;
return 1;
+ }
if (test_mode()) {
+ vg->status |= ARCHIVED_VG;
log_verbose("Test mode: Skipping archiving of volume group.");
return 1;
}