]> git.tuebingen.mpg.de Git - dss.git/blobdiff - snap.h
Merge branch 'master' into rm_hook
[dss.git] / snap.h
diff --git a/snap.h b/snap.h
index 90a2e3a827abf6b373410d42d310efa013731fef..7ac951fc313adb9f0867bc90463d4773f215adb9 100644 (file)
--- a/snap.h
+++ b/snap.h
@@ -1,3 +1,8 @@
+/*
+ * Copyright (C) 2008 Andre Noll <maan@systemlinux.org>
+ *
+ * Licensed under the GPL v2. For licencing details see COPYING.
+ */
 
 /** The state of snapshot creation. */
 enum {
@@ -11,10 +16,26 @@ enum {
        SCS_RSYNC_RUNNING,
        /** The rsync process exited successfully. */
        SCS_RSYNC_SUCCESS,
+       /** The rsync process needs to be restarted. */
+       SCS_RSYNC_NEEDS_RESTART,
        /** The post-create hook has been started. */
        SCS_POST_HOOK_RUNNING,
 };
 
+/** The state of snapshot removal. */
+enum {
+       /** No snapshot is currently being removed. */
+       SRS_READY,
+       /** The pre-removal hook has been started. */
+       SRS_PRE_HOOK_RUNNING,
+       /** The pre-remove hook failed, we're waiting to execute it again. */
+       SRS_PRE_HOOK_FAILURE,
+       /** The rm command is currently executing. */
+       SRS_RM_RUNNING,
+       /** The post-remove hook ist running. */
+       SRS_POST_HOOK_RUNNING,
+};
+
 /**
  * The status of a snapshot.
  *
@@ -33,7 +54,7 @@ enum snapshot_status_flags {
        SS_BEING_DELETED = 2,
 };
 
-/** Desribes one snapshot */
+/** Describes one snapshot. */
 struct snapshot {
        /** The name of the directory, relative to the destination dir. */
        char *name;