[CRIU] [PATCH 1/4] join-ns: add join-ns option to criu CLI and RPC
Dengguangxing
dengguangxing at huawei.com
Mon Apr 4 18:31:07 PDT 2016
>> @@ -35,6 +39,146 @@ static struct ns_desc *ns_desc_array[] = {
>> &cgroup_ns_desc,
>> };
>>
>> +unsigned int join_ns_flags = 0;
>
> This variable is only read in patch #3, but the patch itself looks
> unneeded (see comment to it), so the whole join_ns_flags becomes
> unneeded too.
Sorry for so many coding-stype problems. will check this again.
join_ns_flags is needed in the following function - check_namespace_opts.
and you are right it is unneeded in patch #3.
I will amend this patch set according to your reviewment and resend later.
>
>> +
>> +int check_namespace_opts() {
>
> { should go on separate line. We used Linux kernel coding style, you can
> check your patches to fit one with linux/scripts/checkpatch.pl
>
>> + errno = 22;
>> + if (join_ns_flags & opts.rst_namespaces_flags) {
>> + pr_perror("Conflict flags: -join-ns and -namespace");
>> + return -1;
>> + }
>> + if (join_ns_flags & opts.empty_ns) {
>> + pr_perror("Conflict flags: -join-ns and -empty-ns");
>> + return -1;
>> + }
>> + if (opts.empty_ns & opts.rst_namespaces_flags) {
>> + pr_perror("Conflict flags: -empty-ns and -namespace");
>> + return -1;
>> + }
>> + errno = 0;
>> + return 0;
>> +}
More information about the CRIU
mailing list