From: Andre Noll Date: Sun, 1 Sep 2019 17:34:54 +0000 (+0200) Subject: Revamp com_prune(). X-Git-Tag: v1.0.1~1^2~1 X-Git-Url: http://git.tuebingen.mpg.de/?a=commitdiff_plain;h=d4d72473957544283b6d426c3d4fa0b3f583da87;hp=d4d72473957544283b6d426c3d4fa0b3f583da87;p=dss.git Revamp com_prune(). The prune subcommand implements its own logic for picking the snapshot to remove. The algorithm is similar but not identical to how the run subcommand gets rid of snapshots. This patch eliminates this inconsistency by changing com_prune() to call the find_removable_snapshot() helper which was introduced in the previous commit. Since find_removable_snapshot() returns a dynamically allocated string via the "why" pointer, we have to introduce another label for freeing this memory. The patch also improves the help text of the prune subcommand slightly. ---