]> git.ipfire.org Git - people/ms/systemd.git/blobdiff - load-fragment.c
swap: add .swap unit type
[people/ms/systemd.git] / load-fragment.c
index 0dfb49f1138f81d548f61bfe1336ae3c74ed5982..b4e0c760093551ed8c7091fa0c6054cd9d74d22e 100644 (file)
@@ -1171,7 +1171,8 @@ static int load_from_path(Unit *u, const char *path) {
                 [UNIT_DEVICE]    = "Device",
                 [UNIT_MOUNT]     = "Mount",
                 [UNIT_AUTOMOUNT] = "Automount",
-                [UNIT_SNAPSHOT]  = "Snapshot"
+                [UNIT_SNAPSHOT]  = "Snapshot",
+                [UNIT_SWAP]      = "Swap"
         };
 
 #define EXEC_CONTEXT_CONFIG_ITEMS(context, section) \
@@ -1286,6 +1287,10 @@ static int load_from_path(Unit *u, const char *path) {
 
                 { "Where",                  config_parse_path,            &u->automount.where,                             "Automount" },
 
+                { "What",                   config_parse_path,            &u->swap.what,                                   "Swap" },
+                { "Priority",               config_parse_unsigned,        &u->swap.priority,                               "Swap" },
+                { "NoAuto",                 config_parse_bool,            &u->swap.no_auto,                                "Swap" },
+
                 { NULL, NULL, NULL, NULL }
         };