swap: adjust swap.c in a similar way to what we just did to mount.c
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.
This commit is contained in:
@@ -978,8 +978,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"
|
||||
|
||||
@@ -170,8 +170,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,
|
||||
|
||||
Reference in New Issue
Block a user