chiark / gitweb /
swap: properly enter maintenance mode on failure
authorLennart Poettering <lennart@poettering.net>
Mon, 9 Aug 2010 20:44:52 +0000 (22:44 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 9 Aug 2010 20:44:52 +0000 (22:44 +0200)
src/swap.c

index 6765a4a..2900671 100644 (file)
@@ -400,7 +400,7 @@ static void swap_dump(Unit *u, FILE *f, const char *prefix) {
 static void swap_enter_dead(Swap *s, bool success) {
         assert(s);
 
-        swap_set_state(s, success ? SWAP_MAINTENANCE : SWAP_DEAD);
+        swap_set_state(s, success ? SWAP_DEAD : SWAP_MAINTENANCE);
 }
 
 static int swap_start(Unit *u) {