From: Lennart Poettering Date: Mon, 25 Sep 2017 17:53:19 +0000 (+0200) Subject: swap: adjust swap.c in a similar way to what we just did to mount.c X-Git-Tag: v235.1~76 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=e433767f8bd01114b98fdda6a546fa17e716fa60;p=elogind.git 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. --- diff --git a/src/basic/unit-name.c b/src/basic/unit-name.c index e64fe7007..4ccc456ef 100644 --- a/src/basic/unit-name.c +++ b/src/basic/unit-name.c @@ -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" diff --git a/src/basic/unit-name.h b/src/basic/unit-name.h index cfe21474a..6ffe29076 100644 --- a/src/basic/unit-name.h +++ b/src/basic/unit-name.h @@ -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,