-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,
-};
+/* SPDX-License-Identifier: GPL-2.0 */
+
+/** The possible states for snapshot creation/removal. */
+#define HOOK_STATUS_ARRAY \
+ HSA_ITEM(HS_READY, "ready for action"), \
+ HSA_ITEM(HS_PRE_RUNNING, "pre-hook running"), \
+ HSA_ITEM(HS_PRE_SUCCESS, "pre-hook completed successfully"), \
+ HSA_ITEM(HS_RUNNING, "in progress"), \
+ HSA_ITEM(HS_SUCCESS, "process terminated successfully"), \
+ HSA_ITEM(HS_NEEDS_RESTART, "restart needed"), \
+ HSA_ITEM(HS_POST_RUNNING, "post-hook running")
+
+
+#define HSA_ITEM(x, y) x
+enum hook_status {HOOK_STATUS_ARRAY};
+#undef HSA_ITEM
+#define HSA_ITEM(x, y) y