lib: Add helpers to setup ghost limit

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov 2015-08-10 17:20:50 +03:00 committed by Pavel Emelyanov
parent 7c98cb37ad
commit c5d485c94b
2 changed files with 13 additions and 0 deletions

View file

@ -674,6 +674,17 @@ int criu_add_skip_mnt(char *mnt)
return criu_local_add_skip_mnt(global_opts, mnt);
}
void criu_local_set_ghost_limit(criu_opts *opts, unsigned int limit)
{
opts->rpc->has_ghost_limit = true;
opts->rpc->ghost_limit = limit;
}
void criu_set_ghost_limit(unsigned int limit)
{
criu_local_set_ghost_limit(global_opts, limit);
}
static CriuResp *recv_resp(int socket_fd)
{
unsigned char *buf;

View file

@ -87,6 +87,7 @@ int criu_add_veth_pair(char *in, char *out);
int criu_add_cg_root(char *ctrl, char *path);
int criu_add_enable_fs(char *fs);
int criu_add_skip_mnt(char *mnt);
void criu_set_ghost_limit(unsigned int limit);
/*
* The criu_notify_arg_t na argument is an opaque
@ -187,6 +188,7 @@ int criu_local_add_veth_pair(criu_opts *opts, char *in, char *out);
int criu_local_add_cg_root(criu_opts *opts, char *ctrl, char *path);
int criu_local_add_enable_fs(criu_opts *opts, char *fs);
int criu_local_add_skip_mnt(criu_opts *opts, char *mnt);
void criu_local_set_ghost_limit(criu_opts *opts, unsigned int limit);
void criu_local_set_notify_cb(criu_opts *opts, int (*cb)(char *action, criu_notify_arg_t na));