]> git.tuebingen.mpg.de Git - dss.git/commitdiff
dss.c: Add some more documentation.
authorAndre Noll <maan@systemlinux.org>
Sat, 22 Mar 2008 10:00:21 +0000 (11:00 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 22 Mar 2008 10:00:21 +0000 (11:00 +0100)
dss.c

diff --git a/dss.c b/dss.c
index 1bab9aef5f2dce9c92c5416e0d266a1bd1df35cc..c3a09654b4e6cba473cb3cdfd40ecc3873d64f4c 100644 (file)
--- 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;
 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;
 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. */
 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 {
 static char *path_to_last_complete_snapshot;
 
 enum {
+       /** We are ready to take the next snapshot. */
        SCS_READY,
        SCS_READY,
+       /** The pre-creation hook has been started. */
        SCS_PRE_HOOK_RUNNING,
        SCS_PRE_HOOK_RUNNING,
+       /** The pre-creation hook exited successfully. */
        SCS_PRE_HOOK_SUCCESS,
        SCS_PRE_HOOK_SUCCESS,
+       /** The rsync process is running. */
        SCS_RSYNC_RUNNING,
        SCS_RSYNC_RUNNING,
+       /** The rsync process exited successfully. */
        SCS_RSYNC_SUCCESS,
        SCS_RSYNC_SUCCESS,
+       /** The post-create hook has been started- */
        SCS_POST_HOOK_RUNNING,
 };
 
        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 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)
 #define NUM_COMPARE(x, y) ((int)((x) < (y)) - (int)((x) > (y)))
 
 static int compare_snapshots(const void *a, const void *b)