mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
libcriu: add setting lsm-mount-context to libcriu
Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
parent
af298353dc
commit
0e04a3c6a6
2 changed files with 17 additions and 0 deletions
15
lib/c/criu.c
15
lib/c/criu.c
|
|
@ -238,6 +238,7 @@ void criu_local_free_opts(criu_opts *opts)
|
|||
free(opts->rpc->freeze_cgroup);
|
||||
free(opts->rpc->log_file);
|
||||
free(opts->rpc->lsm_profile);
|
||||
free(opts->rpc->lsm_mount_context);
|
||||
free(opts->rpc);
|
||||
criu_free_service(opts);
|
||||
free(opts);
|
||||
|
|
@ -651,6 +652,20 @@ int criu_set_lsm_profile(const char *name)
|
|||
return criu_local_set_lsm_profile(global_opts, name);
|
||||
}
|
||||
|
||||
int criu_local_set_lsm_mount_context(criu_opts *opts, const char *name)
|
||||
{
|
||||
opts->rpc->lsm_mount_context = strdup(name);
|
||||
if (opts->rpc->lsm_mount_context == NULL) {
|
||||
return -ENOMEM;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int criu_set_lsm_mount_context(const char *name)
|
||||
{
|
||||
return criu_local_set_lsm_mount_context(global_opts, name);
|
||||
}
|
||||
|
||||
void criu_local_set_timeout(criu_opts *opts, unsigned int timeout)
|
||||
{
|
||||
opts->rpc->timeout = timeout;
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ void criu_set_manage_cgroups(bool manage);
|
|||
void criu_set_manage_cgroups_mode(enum criu_cg_mode mode);
|
||||
int criu_set_freeze_cgroup(const char *name);
|
||||
int criu_set_lsm_profile(const char *name);
|
||||
int criu_set_lsm_mount_context(const char *name);
|
||||
void criu_set_timeout(unsigned int timeout);
|
||||
void criu_set_auto_ext_mnt(bool val);
|
||||
void criu_set_ext_sharing(bool val);
|
||||
|
|
@ -249,6 +250,7 @@ void criu_local_set_manage_cgroups(criu_opts *opts, bool manage);
|
|||
void criu_local_set_manage_cgroups_mode(criu_opts *opts, enum criu_cg_mode mode);
|
||||
int criu_local_set_freeze_cgroup(criu_opts *opts, const char *name);
|
||||
int criu_local_set_lsm_profile(criu_opts *opts, const char *name);
|
||||
int criu_local_set_lsm_mount_context(criu_opts *opts, const char *name);
|
||||
void criu_local_set_timeout(criu_opts *opts, unsigned int timeout);
|
||||
void criu_local_set_auto_ext_mnt(criu_opts *opts, bool val);
|
||||
void criu_local_set_ext_sharing(criu_opts *opts, bool val);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue