X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=dss.c;h=5f35435727e956c13bb82f6801fdbe251204665f;hb=2f2b61d159e93e3da97c21da3d644c2c549bf12c;hp=b6a3d3e714059861ab1ae100933655b7e4e13c50;hpb=dd3f58c0bdf1e9f7bb86d09e6f7faf155d6b5310;p=dss.git diff --git a/dss.c b/dss.c index b6a3d3e..5f35435 100644 --- a/dss.c +++ b/dss.c @@ -81,7 +81,7 @@ static int64_t next_snapshot_time; static struct timeval next_removal_check; /** Creation time of the snapshot currently being created. */ static int64_t current_snapshot_creation_time; -/** The snapshot currently being removed. */ +/* Set by the pre-rm hook, cleared by handle_remove_exit(). */ struct snapshot *snapshot_currently_being_removed; /** Needed by the post-create hook. */ static char *path_to_last_complete_snapshot; @@ -574,9 +574,6 @@ static int is_reference_snapshot(struct snapshot *s) return strcmp(s->name, name_of_reference_snapshot)? 0 : 1; } -/* - * return: 0: no redundant snapshots, 1: rm process started, negative: error - */ static struct snapshot *find_redundant_snapshot(struct snapshot_list *sl) { int i, interval; @@ -1447,7 +1444,7 @@ static void create_rsync_argv(char ***argv, int64_t *num) OPT_STRING_VAL(DSS, REMOTE_USER) : logname, OPT_STRING_VAL(DSS, REMOTE_HOST), lls_string_val(j, OPT_RESULT(DSS, SOURCE_DIR)), - N == 1? "/" : "" + OPT_GIVEN(DSS, SOURCE_DIR) == 1? "/" : "" ); } } @@ -1570,7 +1567,7 @@ static void exit_hook(int exit_code) { pid_t pid; char **argv, *tmp = dss_strdup(OPT_STRING_VAL(DSS, EXIT_HOOK)); - unsigned n = split_args(tmp, &argv, " \t"); + unsigned n = split_args(tmp, &argv); n++; argv = dss_realloc(argv, (n + 1) * sizeof(char *));