From: Andre Noll Date: Sun, 1 Sep 2019 17:29:39 +0000 (+0200) Subject: prune: Fail gracefully if pre-rm hook fails. X-Git-Tag: v1.0.1~1^2~7 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=5874e6d96f97e2dc7bb0771408b298ae5f4e00ed;p=dss.git 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. --- 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; }