From 5874e6d96f97e2dc7bb0771408b298ae5f4e00ed Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 1 Sep 2019 19:29:39 +0200 Subject: [PATCH] prune: Fail gracefully if pre-rm hook fails. In this case wait_for_remove_process() returns non-negative and we miss to set the exit code, making the command appear to succeed even if the rm process has not been created. --- dss.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dss.c b/dss.c index a219cfd..f91883a 100644 --- a/dss.c +++ b/dss.c @@ -1675,6 +1675,7 @@ rm: ret = wait_for_remove_process(); if (ret < 0) goto out; + ret = -E_HOOK_FAILED; if (snapshot_removal_status != HS_PRE_SUCCESS) goto out; } -- 2.39.5