From 0c2c10f4b67fc2e7a7146cb1baea3214eb955647 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 22 Mar 2008 11:00:21 +0100 Subject: [PATCH] dss.c: Add some more documentation. --- dss.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/dss.c b/dss.c index 1bab9ae..c3a0965 100644 --- a/dss.c +++ b/dss.c @@ -42,8 +42,9 @@ static int rsync_stopped; static pid_t rm_pid; /** When the next snapshot is due. */ struct timeval next_snapshot_time; - +/** The pid of the pre-create hook. */ pid_t pre_create_hook_pid; +/** The pid of the post-create hook. */ pid_t post_create_hook_pid; /* Creation time of the snapshot currently being created. */ @@ -52,11 +53,17 @@ int64_t current_snapshot_creation_time; static char *path_to_last_complete_snapshot; enum { + /** We are ready to take the next snapshot. */ SCS_READY, + /** The pre-creation hook has been started. */ SCS_PRE_HOOK_RUNNING, + /** The pre-creation hook exited successfully. */ SCS_PRE_HOOK_SUCCESS, + /** The rsync process is running. */ SCS_RSYNC_RUNNING, + /** The rsync process exited successfully. */ SCS_RSYNC_SUCCESS, + /** The post-create hook has been started- */ SCS_POST_HOOK_RUNNING, }; @@ -301,8 +308,6 @@ struct snapshot_list { #define FOR_EACH_SNAPSHOT(s, i, sl) \ for ((i) = 0; (i) < (sl)->num_snapshots && ((s) = (sl)->snapshots[(i)]); (i)++) - - #define NUM_COMPARE(x, y) ((int)((x) < (y)) - (int)((x) > (y))) static int compare_snapshots(const void *a, const void *b) -- 2.39.5