chiark / gitweb /
swap: adjust swap.c in a similar way to what we just did to mount.c
authorLennart Poettering <lennart@poettering.net>
Mon, 25 Sep 2017 17:53:19 +0000 (19:53 +0200)
committerSven Eden <yamakuzure@gmx.net>
Mon, 25 Sep 2017 17:53:19 +0000 (19:53 +0200)
Also drop the redundant states and make all similar changes too.
Thankfully the swap.c state engine is much simpler than mount.c's, hence
this should be easier to digest.

src/basic/unit-name.c
src/basic/unit-name.h

index e64fe7007910572050152808493fc1d706a54908..4ccc456ef764b0588d1b96e0ec16f042162bbb86 100644 (file)
@@ -983,8 +983,6 @@ static const char* const swap_state_table[_SWAP_STATE_MAX] = {
         [SWAP_ACTIVATING_DONE] = "activating-done",
         [SWAP_ACTIVE] = "active",
         [SWAP_DEACTIVATING] = "deactivating",
-        [SWAP_ACTIVATING_SIGTERM] = "activating-sigterm",
-        [SWAP_ACTIVATING_SIGKILL] = "activating-sigkill",
         [SWAP_DEACTIVATING_SIGTERM] = "deactivating-sigterm",
         [SWAP_DEACTIVATING_SIGKILL] = "deactivating-sigkill",
         [SWAP_FAILED] = "failed"
index cfe21474a44eb6fbd4bbe4fd1226b26d4107405d..6ffe2907637fa7bc2b16109332b6ad1901eaf864 100644 (file)
@@ -171,8 +171,6 @@ typedef enum SwapState {
         SWAP_ACTIVATING_DONE,          /* /sbin/swapon is running, and the swap is done. */
         SWAP_ACTIVE,
         SWAP_DEACTIVATING,
-        SWAP_ACTIVATING_SIGTERM,
-        SWAP_ACTIVATING_SIGKILL,
         SWAP_DEACTIVATING_SIGTERM,
         SWAP_DEACTIVATING_SIGKILL,
         SWAP_FAILED,