From: Andre Noll Date: Mon, 27 Apr 2009 18:19:11 +0000 (+0200) Subject: Fix rm-hooks in case no post-remove hook was specified. X-Git-Tag: v0.1.3~12 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=723146898de138324dd6e421af05fd61c6cda848;p=dss.git Fix rm-hooks in case no post-remove hook was specified. Without the patch the following assertion was triggered upon removal of the second snapshot: dss: dss.c:229: pre_remove_hook: Assertion `!snapshot_currently_being_removed' failed. Thanks to Sebastian Stark who pointed out the issue. --- diff --git a/dss.c b/dss.c index cee49d6..c0597f3 100644 --- a/dss.c +++ b/dss.c @@ -568,7 +568,10 @@ static int handle_rm_exit(int status) snapshot_removal_status = HS_READY; return -E_BAD_EXIT_CODE; } - snapshot_removal_status = HS_SUCCESS; + if (conf.post_remove_hook_given) + snapshot_removal_status = HS_SUCCESS; + else + snapshot_removal_status = HS_READY; return 1; }