lib/c: add empty_ns interfaces to libcriu

crun wants to set empty_ns and this interface is missing from the
library. This adds it to libcriu.

Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
Adrian Reber 2023-05-11 16:18:31 +00:00 committed by Andrei Vagin
parent b665dce3c7
commit 36709536e5
2 changed files with 14 additions and 0 deletions

View file

@ -2030,3 +2030,14 @@ int criu_feature_check(struct criu_feature_check *features, size_t size)
{
return criu_local_feature_check(global_opts, features, size);
}
void criu_local_set_empty_ns(criu_opts *opts, int namespaces)
{
opts->rpc->has_empty_ns = true;
opts->rpc->empty_ns = namespaces;
}
void criu_set_empty_ns(int namespaces)
{
criu_local_set_empty_ns(global_opts, namespaces);
}

View file

@ -322,6 +322,9 @@ struct criu_feature_check {
int criu_feature_check(struct criu_feature_check *features, size_t size);
int criu_local_feature_check(criu_opts *opts, struct criu_feature_check *features, size_t size);
void criu_local_set_empty_ns(criu_opts *opts, int namespaces);
void criu_set_empty_ns(int namespaces);
#ifdef __GNUG__
}
#endif