[CRIU] [PATCH 25/28] rst: remove obsolete code once more

Kinsbursky Stanislav skinsbursky at openvz.org
Thu Mar 22 14:00:19 EDT 2012


From: Stanislav Kinsbursky <skinsbursky at openvz.org>

Signed-off-by: Stanislav Kinsbursky <skinsbursky at openvz.org>
---
 files.c         |   46 ----------------------------------------------
 include/image.h |    5 -----
 2 files changed, 0 insertions(+), 51 deletions(-)
-------------- next part --------------
diff --git a/files.c b/files.c
index 6f4bc70..1f21b30 100644
--- a/files.c
+++ b/files.c
@@ -21,8 +21,6 @@
 #include "lock.h"
 #include "file-ids.h"
 
-static struct fmap_fd *fmap_fds;
-
 struct file_recipient {
 	struct list_head	list;
 	int			pid;
@@ -150,9 +148,6 @@ int prepare_fd_pid(int pid)
 		if (ret <= 0)
 			break;
 
-		if (e.len)
-			lseek(fdinfo_fd, e.len, SEEK_CUR);
-
 		if (fd_is_special(fde))
 			continue;
 
@@ -337,26 +332,6 @@ static int open_fd_transport(int pid, struct file_info *fi, struct fd_entry *fde
 	return open_transport(pid, fde->fd, fi);
 }
 
-static int collect_fmap(int pid, struct fdinfo_entry *fe, int fd)
-{
-	struct fmap_fd *new;
-
-	new = xmalloc(sizeof(*new));
-	if (!new)
-		return -1;
-
-	new->start	= fe->addr;
-	new->next	= fmap_fds;
-	new->pid	= pid;
-	new->id		= fe->fde.id;
-
-	fmap_fds	= new;
-
-	pr_info("%d: Added shared map %16lx\n", pid, new->start);
-
-	return 0;
-}
-
 static int open_fdinfo(int pid, struct fd_entry *fde, int *fdinfo_fd, int state)
 {
 	int ret;
@@ -448,27 +423,6 @@ err:
 	return err;
 }
 
-static struct fmap_fd *pull_fmap_fd(int pid, unsigned long start)
-{
-	struct fmap_fd **p, *r;
-
-	pr_info("%d: Looking for %lx : ", pid, start);
-
-	for (p = &fmap_fds; *p != NULL; p = &(*p)->next) {
-		if ((*p)->start != start || (*p)->pid != pid)
-			continue;
-
-		r = *p;
-		*p = r->next;
-		pr_info("found\n");
-
-		return r;
-	}
-
-	pr_info("not found\n");
-	return NULL;
-}
-
 int get_filemap_fd(int pid, struct vma_entry *vma_entry)
 {
 	struct file_info *fi;
diff --git a/include/image.h b/include/image.h
index abc7fd0..62c6bac 100644
--- a/include/image.h
+++ b/include/image.h
@@ -62,11 +62,6 @@ struct file_entry {
 
 struct fdinfo_entry {
 	struct fd_entry fde;
-	u8	len;
-	u16	flags;
-	u32	pos;
-	u64	addr;
-	u8	name[0];
 } __packed;
 
 #define fd_is_special(fde)	((fde)->type == FDINFO_MAP)


More information about the CRIU mailing list