]> git.tuebingen.mpg.de Git - dss.git/commit - dss.c
Revamp com_prune().
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 1 Sep 2019 17:34:54 +0000 (19:34 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 21 Sep 2019 13:11:09 +0000 (15:11 +0200)
commitd4d72473957544283b6d426c3d4fa0b3f583da87
tree339f474caaf544635913a0cbe51fb496be63784b
parente3f9c1dcc861be14fc9a3f33057a905047e9a926
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.
dss.c
dss.suite
err.h