2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-23 02:17:22 +00:00
criu/include/action-scripts.h
Cyrill Gorcunov 5676383729 scripts: Add ACT_MAX limit and make @action_names being const
@action_names is rather a const array, so make
sure we never access some data outside of it
defining its size.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2014-10-27 21:30:37 +04:00

27 lines
519 B
C

#ifndef __CR_ACTION_SCRIPTS_H__
#define __CR_ACTION_SCRIPTS_H__
struct script {
struct list_head node;
char *path;
int arg;
};
#define SCRIPT_RPC_NOTIFY (char *)0x1
enum script_actions {
ACT_POST_DUMP = 0,
ACT_POST_RESTORE = 1,
ACT_NET_LOCK = 2,
ACT_NET_UNLOCK = 3,
ACT_SETUP_NS = 4,
ACT_MAX
};
extern int add_script(char *path, int arg);
extern int run_scripts(enum script_actions);
extern int send_criu_rpc_script(enum script_actions act, char *name, int arg);
#endif /* __CR_ACTION_SCRIPTS_H__ */