summaryrefslogtreecommitdiff
path: root/src/core/swap.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-11-25 15:26:30 +0100
committerLennart Poettering <lennart@poettering.net>2013-11-25 17:40:53 +0100
commit5bcb0f2ba0615897662fcd4f6227d066781c6fc2 (patch)
treedd84b5a299cbc7b476676aa7875f8685dbfd216b /src/core/swap.h
parentf1421cc67dba47f0fdb1c963cf65115c8a8e72f0 (diff)
swap: split state machine state ACTIVATING into two
We expect the event on /proc/swaps before we expect the SIGCHILD, reflect this in the state machine.
Diffstat (limited to 'src/core/swap.h')
-rw-r--r--src/core/swap.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/core/swap.h b/src/core/swap.h
index c51c55f839..313a195957 100644
--- a/src/core/swap.h
+++ b/src/core/swap.h
@@ -28,7 +28,8 @@ typedef struct Swap Swap;
typedef enum SwapState {
SWAP_DEAD,
- SWAP_ACTIVATING,
+ SWAP_ACTIVATING, /* /sbin/swapon is running, but the swap not yet enabled. */
+ SWAP_ACTIVATING_DONE, /* /sbin/swapon is running, and the swap is done. */
SWAP_ACTIVE,
SWAP_DEACTIVATING,
SWAP_ACTIVATING_SIGTERM,
@@ -47,13 +48,6 @@ typedef enum SwapExecCommand {
_SWAP_EXEC_COMMAND_INVALID = -1
} SwapExecCommand;
-typedef struct SwapParameters {
- char *what;
- int priority;
- bool noauto:1;
- bool nofail:1;
-} SwapParameters;
-
typedef enum SwapResult {
SWAP_SUCCESS,
SWAP_FAILURE_RESOURCES,
@@ -65,6 +59,13 @@ typedef enum SwapResult {
_SWAP_RESULT_INVALID = -1
} SwapResult;
+typedef struct SwapParameters {
+ char *what;
+ int priority;
+ bool noauto:1;
+ bool nofail:1;
+} SwapParameters;
+
struct Swap {
Unit meta;