[04/12] files: Kill unused CTL_TTY_OFF leftovers

Submitted by Kirill Tkhai on Dec. 26, 2017, 3:46 p.m.

Details

Message ID 151430318033.1302.654521394138121807.stgit@localhost.localdomain
State New
Series "Introduce custom per-task service fds placement"
Headers show

Commit Message

Kirill Tkhai Dec. 26, 2017, 3:46 p.m.
CTL_TTY_OFF and reserve_service_fd() are unused now,
so purge them from the code.

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

Patch hide | download patch | download mbox

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);