]> git.proxmox.com Git - mirror_lxc.git/blob - src/lxc/state.h
Merge pull request #3235 from xinhua9569/master
[mirror_lxc.git] / src / lxc / state.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2
3 #ifndef __LXC_STATE_H
4 #define __LXC_STATE_H
5
6 #define MAX_STATE_LENGTH (8 + 1)
7
8 typedef enum {
9 STOPPED,
10 STARTING,
11 RUNNING,
12 STOPPING,
13 ABORTING,
14 FREEZING,
15 FROZEN,
16 THAWED,
17 MAX_STATE,
18 } lxc_state_t;
19
20 enum {
21 REBOOT_NONE,
22 REBOOT_REQ,
23 REBOOT_INIT
24 };
25
26 extern lxc_state_t lxc_getstate(const char *name, const char *lxcpath);
27
28 extern lxc_state_t lxc_str2state(const char *state);
29 extern const char *lxc_state2str(lxc_state_t state);
30 extern int lxc_wait(const char *lxcname, const char *states, int timeout, const char *lxcpath);
31
32 #endif