fix retention show message, when no policy is set

This commit is contained in:
Anastasia
2017-02-15 19:46:40 +03:00
parent 23abfcb5ce
commit 8775a399cb
+6
View File
@@ -68,6 +68,12 @@ do_show(time_t backup_id)
int int
do_retention_show(void) do_retention_show(void)
{ {
if (retention_redundancy == 0 && retention_window == 0)
{
fprintf(stdout, "No retention policy is set\n");
return 0;
}
fprintf(stdout, "# retention policy\n"); fprintf(stdout, "# retention policy\n");
if (retention_redundancy > 0) if (retention_redundancy > 0)
fprintf(stdout, "REDUNDANCY=%u\n", retention_redundancy); fprintf(stdout, "REDUNDANCY=%u\n", retention_redundancy);