[CRIU] [PATCH 04/12] files: Kill unused CTL_TTY_OFF leftovers

Kirill Tkhai ktkhai at virtuozzo.com
Tue Dec 26 18:46:20 MSK 2017


CTL_TTY_OFF and reserve_service_fd() are unused now,
so purge them from the code.

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 criu/include/servicefd.h |    2 --
 criu/util.c              |   10 ----------
 2 files changed, 12 deletions(-)

diff --git a/criu/include/servicefd.h b/criu/include/servicefd.h
index 29e5b0bdb..175e53023 100644
--- a/criu/include/servicefd.h
+++ b/criu/include/servicefd.h
@@ -10,7 +10,6 @@ enum sfd_type {
 	IMG_FD_OFF,
 	PROC_FD_OFF,	/* fd with /proc for all proc_ calls */
 	PROC_PID_FD_OFF,
-	CTL_TTY_OFF,
 	SELF_STDIN_OFF,
 	CR_PROC_FD_OFF, /* some other's proc fd.
 			 *  For dump -- target ns' proc
@@ -33,7 +32,6 @@ struct pstree_item;
 extern int clone_service_fd(int id);
 extern int init_service_fd(void);
 extern int get_service_fd(enum sfd_type type);
-extern int reserve_service_fd(enum sfd_type type);
 extern int install_service_fd(enum sfd_type type, int fd);
 extern int close_service_fd(enum sfd_type type);
 extern bool is_service_fd(int fd, enum sfd_type type);
diff --git a/criu/util.c b/criu/util.c
index 80c40c6ec..386c755a6 100644
--- a/criu/util.c
+++ b/criu/util.c
@@ -474,16 +474,6 @@ int service_fd_min_fd(struct pstree_item *item)
 
 static DECLARE_BITMAP(sfd_map, SERVICE_FD_MAX);
 
-int reserve_service_fd(enum sfd_type type)
-{
-	int sfd = __get_service_fd(type, service_fd_id);
-
-	BUG_ON((int)type <= SERVICE_FD_MIN || (int)type >= SERVICE_FD_MAX);
-
-	set_bit(type, sfd_map);
-	return sfd;
-}
-
 int install_service_fd(enum sfd_type type, int fd)
 {
 	int sfd = __get_service_fd(type, service_fd_id);



More information about the CRIU mailing list