summaryrefslogtreecommitdiff
path: root/lib/snapshot
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2012-01-20 22:02:04 +0000
committerMike Snitzer <snitzer@redhat.com>2012-01-20 22:02:04 +0000
commit23e34c729be7acdab774b2fdf29e125da4c3d392 (patch)
tree821aafadf7e4c1675de6341b870bc1d770952802 /lib/snapshot
parent861c624acb49bd2c3defc872ff943f6313328dc5 (diff)
downloadlvm2-23e34c729be7acdab774b2fdf29e125da4c3d392.tar.gz
Differentiate between snapshot status of "Invalid" and "Merge failed".
Diffstat (limited to 'lib/snapshot')
-rw-r--r--lib/snapshot/snapshot.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/snapshot/snapshot.c b/lib/snapshot/snapshot.c
index ddb9f7f50..662614ce8 100644
--- a/lib/snapshot/snapshot.c
+++ b/lib/snapshot/snapshot.c
@@ -136,9 +136,11 @@ static int _snap_target_percent(void **target_state __attribute__((unused)),
*percent = PERCENT_100;
else
*percent = make_percent(*total_numerator, *total_denominator);
- } else if (!strcmp(params, "Invalid") ||
- !strcmp(params, "Merge failed"))
+ }
+ else if (!strcmp(params, "Invalid"))
*percent = PERCENT_INVALID;
+ else if (!strcmp(params, "Merge failed"))
+ *percent = PERCENT_MERGE_FAILED;
else
return 0;