mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
Add --weak_sysctl CLI option to RPC and lib
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
22140b97c9
commit
d1be199765
4 changed files with 17 additions and 0 deletions
|
|
@ -327,6 +327,9 @@ static int setup_opts_from_req(int sk, CriuOpts *req)
|
|||
if (req->has_tcp_skip_in_flight)
|
||||
opts.tcp_skip_in_flight = req->tcp_skip_in_flight;
|
||||
|
||||
if (req->has_weak_sysctls)
|
||||
opts.weak_sysctls = req->weak_sysctls;
|
||||
|
||||
if (req->has_evasive_devices)
|
||||
opts.evasive_devices = req->evasive_devices;
|
||||
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@ message criu_opts {
|
|||
optional string freeze_cgroup = 44;
|
||||
optional uint32 timeout = 45;
|
||||
optional bool tcp_skip_in_flight = 46;
|
||||
optional bool weak_sysctls = 47;
|
||||
}
|
||||
|
||||
message criu_dump_resp {
|
||||
|
|
|
|||
11
lib/c/criu.c
11
lib/c/criu.c
|
|
@ -321,6 +321,17 @@ void criu_set_tcp_skip_in_flight(bool tcp_skip_in_flight)
|
|||
criu_local_set_tcp_skip_in_flight(global_opts, tcp_skip_in_flight);
|
||||
}
|
||||
|
||||
void criu_local_set_weak_sysctls(criu_opts *opts, bool val)
|
||||
{
|
||||
opts->rpc->has_weak_sysctls = true;
|
||||
opts->rpc->weak_sysctls = val;
|
||||
}
|
||||
|
||||
void criu_set_weak_sysctls(bool val)
|
||||
{
|
||||
criu_local_set_weak_sysctls(global_opts, val);
|
||||
}
|
||||
|
||||
void criu_local_set_evasive_devices(criu_opts *opts, bool evasive_devices)
|
||||
{
|
||||
opts->rpc->has_evasive_devices = true;
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ void criu_set_ext_unix_sk(bool ext_unix_sk);
|
|||
int criu_add_unix_sk(unsigned int inode);
|
||||
void criu_set_tcp_established(bool tcp_established);
|
||||
void criu_set_tcp_skip_in_flight(bool tcp_skip_in_flight);
|
||||
void criu_set_weak_sysctls(bool val);
|
||||
void criu_set_evasive_devices(bool evasive_devices);
|
||||
void criu_set_shell_job(bool shell_job);
|
||||
void criu_set_file_locks(bool file_locks);
|
||||
|
|
@ -173,6 +174,7 @@ void criu_local_set_ext_unix_sk(criu_opts *opts, bool ext_unix_sk);
|
|||
int criu_local_add_unix_sk(criu_opts *opts, unsigned int inode);
|
||||
void criu_local_set_tcp_established(criu_opts *opts, bool tcp_established);
|
||||
void criu_local_set_tcp_skip_in_flight(criu_opts *opts, bool tcp_skip_in_flight);
|
||||
void criu_local_set_weak_sysctls(criu_opts *opts, bool val);
|
||||
void criu_local_set_evasive_devices(criu_opts *opts, bool evasive_devices);
|
||||
void criu_local_set_shell_job(criu_opts *opts, bool shell_job);
|
||||
void criu_local_set_file_locks(criu_opts *opts, bool file_locks);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue