Commit c881d044 authored by Pavel Emelyanov's avatar Pavel Emelyanov

criu: Warn about --namespaces deprecation

The option was in use when we didn't have the /proc/pid/ns links
and thus ns ids. Later we used it at restore time to tell which
namespaces to restore the pstree into. Right now ids are always
generated and this option has no effect (and meaning).
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 75a9c3b6
......@@ -71,34 +71,6 @@ void init_opts(void)
opts.empty_ns = 0;
}
static int parse_ns_string(const char *ptr)
{
const char *end = ptr + strlen(ptr);
do {
if (ptr[3] != ',' && ptr[3] != '\0')
goto bad_ns;
if (!strncmp(ptr, "uts", 3))
opts.rst_namespaces_flags |= CLONE_NEWUTS;
else if (!strncmp(ptr, "ipc", 3))
opts.rst_namespaces_flags |= CLONE_NEWIPC;
else if (!strncmp(ptr, "mnt", 3))
opts.rst_namespaces_flags |= CLONE_NEWNS;
else if (!strncmp(ptr, "pid", 3))
opts.rst_namespaces_flags |= CLONE_NEWPID;
else if (!strncmp(ptr, "net", 3))
opts.rst_namespaces_flags |= CLONE_NEWNET;
else
goto bad_ns;
ptr += 4;
} while (ptr < end);
return 0;
bad_ns:
pr_msg("Error: unknown namespace: %s\n", ptr);
return -1;
}
static int parse_cpu_cap(struct cr_options *opts, const char *optarg)
{
bool inverse = false;
......@@ -366,8 +338,7 @@ int main(int argc, char *argv[], char *envp[])
opts.output = optarg;
break;
case 'n':
if (parse_ns_string(optarg))
goto bad_arg;
pr_warn("The -n|--namespaces option has no effect and will soon be removed.\n");
break;
case 'v':
if (log_level == LOG_UNSET)
......
......@@ -71,7 +71,6 @@ struct cr_options {
bool tcp_established_ok;
bool evasive_devices;
bool link_remap_ok;
unsigned int rst_namespaces_flags;
bool log_file_per_pid;
bool swrk_restore;
char *output;
......
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