We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ae4757 commit d4443c0Copy full SHA for d4443c0
criu/cr-check.c
@@ -1017,7 +1017,7 @@ static int (*chk_feature)(void);
1017
} while (0)
1018
int cr_check(void)
1019
{
1020
- struct ns_id ns = { .type = NS_CRIU, .ns_pid = PROC_SELF, .nd = &mnt_ns_desc };
+ struct ns_id *ns;
1021
int ret = 0;
1022
1023
if (!is_root_user())
@@ -1032,9 +1032,11 @@ int cr_check(void)
1032
if (collect_pstree_ids())
1033
return -1;
1034
1035
- ns.id = root_item->ids->mnt_ns_id;
+ ns = lookup_ns_by_id(root_item->ids->mnt_ns_id, &mnt_ns_desc);
1036
+ if (ns == NULL)
1037
+ return -1;
1038
- mntinfo = collect_mntinfo(&ns, false);
1039
+ mntinfo = collect_mntinfo(ns, false);
1040
if (mntinfo == NULL)
1041
1042
0 commit comments