Commit d885caf9 authored by Tycho Andersen's avatar Tycho Andersen Committed by Pavel Emelyanov

add RPC options for automatic external mount handling

Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent a052e0b6
......@@ -378,6 +378,15 @@ static int setup_opts_from_req(int sk, CriuOpts *req)
if (req->has_manage_cgroups)
opts.manage_cgroups = req->manage_cgroups;
if (req->has_auto_ext_mnt)
opts.autodetect_ext_mounts = req->auto_ext_mnt;
if (req->has_ext_sharing)
opts.enable_external_sharing = req->ext_sharing;
if (req->has_ext_masters)
opts.enable_external_masters = req->ext_masters;
return 0;
err:
......
......@@ -159,6 +159,24 @@ void criu_set_manage_cgroups(bool manage)
opts->manage_cgroups = manage;
}
void criu_set_auto_ext_mnt(bool val)
{
opts->has_auto_ext_mnt = true;
opts->auto_ext_mnt = val;
}
void criu_set_ext_sharing(bool val)
{
opts->has_ext_sharing = true;
opts->ext_sharing = val;
}
void criu_set_ext_masters(bool val)
{
opts->has_ext_masters = true;
opts->ext_masters = val;
}
void criu_set_log_file(char *log_file)
{
opts->log_file = strdup(log_file);
......
......@@ -48,6 +48,9 @@ void criu_set_log_file(char *log_file);
void criu_set_cpu_cap(unsigned int cap);
void criu_set_root(char *root);
void criu_set_manage_cgroups(bool manage);
void criu_set_auto_ext_mnt(bool val);
void criu_set_ext_sharing(bool val);
void criu_set_ext_masters(bool val);
int criu_set_exec_cmd(int argc, char *argv[]);
int criu_add_ext_mount(char *key, char *val);
int criu_add_veth_pair(char *in, char *out);
......
......@@ -61,6 +61,10 @@ message criu_opts {
optional bool rst_sibling = 26; /* swrk only */
repeated inherit_fd inherit_fd = 27; /* swrk only */
optional bool auto_ext_mnt = 28;
optional bool ext_sharing = 29;
optional bool ext_masters = 30;
}
message criu_dump_resp {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment