[CRIU] [PATCH 5/8] files: Split open_reg_by_id into two parts
Pavel Emelyanov
xemul at parallels.com
Thu Jul 3 08:07:58 PDT 2014
Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
---
files-reg.c | 7 ++++++-
include/files-reg.h | 1 +
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/files-reg.c b/files-reg.c
index 1b469be..e34ef8e 100644
--- a/files-reg.c
+++ b/files-reg.c
@@ -815,6 +815,11 @@ static int do_open_reg(int ns_root_fd, struct reg_file_info *rfi, void *arg)
return fd;
}
+int open_reg_fd(struct file_desc *fd)
+{
+ return open_path(fd, do_open_reg_noseek, NULL);
+}
+
int open_reg_by_id(u32 id)
{
struct file_desc *fd;
@@ -831,7 +836,7 @@ int open_reg_by_id(u32 id)
return -1;
}
- return open_path(fd, do_open_reg_noseek, NULL);
+ return open_reg_fd(fd);
}
int get_filemap_fd(struct vma_area *vma)
diff --git a/include/files-reg.h b/include/files-reg.h
index 52945b0..b4a7367 100644
--- a/include/files-reg.h
+++ b/include/files-reg.h
@@ -26,6 +26,7 @@ struct reg_file_info {
};
extern int open_reg_by_id(u32 id);
+extern int open_reg_fd(struct file_desc *);
extern int open_path(struct file_desc *, int (*open_cb)(int ns_root_fd,
struct reg_file_info *, void *), void *arg);
extern void clear_ghost_files(void);
--
1.8.3.1
More information about the CRIU
mailing list