[CRIU] [PATCH 3/5] parasite_infect_seized(): use open_proc_rw()
Kir Kolyshkin
kir at openvz.org
Thu Feb 16 16:39:34 EST 2012
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
parasite-syscall.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/parasite-syscall.c b/parasite-syscall.c
index 281cc69..7e25722 100644
--- a/parasite-syscall.c
+++ b/parasite-syscall.c
@@ -564,7 +564,6 @@ struct parasite_ctl *parasite_infect_seized(pid_t pid, int pid_dir, struct list_
{
struct parasite_ctl *ctl = NULL;
struct vma_area *vma_area;
- char fname[128];
int ret, fd;
/*
@@ -621,9 +620,8 @@ struct parasite_ctl *parasite_infect_seized(pid_t pid, int pid_dir, struct list_
ctl->map_length = round_up(parasite_size, PAGE_SIZE);
- snprintf(fname, sizeof(fname), "map_files/%p-%p",
+ fd = open_proc_rw(pid_dir, "map_files/%p-%p",
ctl->remote_map, ctl->remote_map + ctl->map_length);
- fd = openat(pid_dir, fname, O_RDWR);
if (fd < 0) {
pr_perror("Can't open remote parasite map");
goto err_restore;
--
1.7.7.6
More information about the CRIU
mailing list