1 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
7 This file is part of systemd.
9 Copyright 2010 Lennart Poettering
10 Copyright 2010 Maarten Lankhorst
12 systemd is free software; you can redistribute it and/or modify it
13 under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
17 systemd is distributed in the hope that it will be useful, but
18 WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with systemd; If not, see <http://www.gnu.org/licenses/>.
26 typedef struct Swap Swap;
30 typedef enum SwapState {
35 _SWAP_STATE_INVALID = -1
38 typedef struct SwapParameters {
49 SwapParameters parameters_etc_fstab;
50 SwapParameters parameters_proc_swaps;
51 SwapParameters parameters_fragment;
55 SwapState state, deserialized_state;
57 bool from_etc_fstab:1;
58 bool from_proc_swaps:1;
62 extern const UnitVTable swap_vtable;
64 int swap_add_one(Manager *m, const char *what, int prio, bool no_auto, bool no_fail, bool handle, bool from_proc_swap);
66 int swap_add_one_mount_link(Swap *s, Mount *m);
68 const char* swap_state_to_string(SwapState i);
69 SwapState swap_state_from_string(const char *s);