Exemplo n.º 1
0
int dump_ipc_ns(int ns_pid, int ns_id)
{
	int ret;
	struct cr_fdset *fdset;

	fdset = cr_fdset_open(ns_id, IPCNS, O_DUMP);
	if (fdset == NULL)
		return -1;

	ret = switch_ns(ns_pid, &ipc_ns_desc, NULL);
	if (ret < 0)
		goto err;

	ret = dump_ipc_data(fdset);
	if (ret < 0) {
		pr_err("Failed to write IPC namespace data\n");
		goto err;
	}

err:
	close_cr_fdset(&fdset);
	return ret < 0 ? -1 : 0;
}
Exemplo n.º 2
0
Arquivo: image.c Projeto: theksk/criu
struct cr_fdset *cr_glob_fdset_open(int mode)
{
	return cr_fdset_open(-1 /* ignored */, GLOB, mode);
}
Exemplo n.º 3
0
Arquivo: image.c Projeto: theksk/criu
struct cr_fdset *cr_task_fdset_open(int pid, int mode)
{
	return cr_fdset_open(pid, TASK, mode);
}
Exemplo n.º 4
0
Arquivo: image.c Projeto: OSLL/pmover
struct cr_fdset *cr_glob_fdset_open(int mode)
{
	return cr_fdset_open(-1 /* ignored */, _CR_FD_GLOB_FROM, _CR_FD_GLOB_TO, mode);
}
Exemplo n.º 5
0
Arquivo: image.c Projeto: OSLL/pmover
struct cr_fdset *cr_ns_fdset_open(int pid, int mode)
{
	return cr_fdset_open(pid, _CR_FD_NS_FROM, _CR_FD_NS_TO, mode);
}
Exemplo n.º 6
0
Arquivo: image.c Projeto: OSLL/pmover
struct cr_fdset *cr_task_fdset_open(int pid, int mode)
{
	return cr_fdset_open(pid, _CR_FD_TASK_FROM, _CR_FD_TASK_TO, mode);
}