[CRIU] [PATCH RFC 12/12] files: Use collect_gen_fd() in tty_collect_fd()

Kirill Tkhai ktkhai at virtuozzo.com
Fri Oct 28 05:54:24 PDT 2016


This improves uniformity.

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 criu/tty.c |   15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/criu/tty.c b/criu/tty.c
index b82947c..146d8d8 100644
--- a/criu/tty.c
+++ b/criu/tty.c
@@ -1121,13 +1121,14 @@ static void tty_collect_fd(struct file_desc *d, struct fdinfo_list_entry *fle,
 	 */
 
 	if (tty_is_master(info) && info->driver->type != TTY_TYPE__CTTY)
-		tgt = &ri->fds;
-	else if (info->driver->type == TTY_TYPE__CTTY)
-		tgt = &ri->tty_ctty;
-	else
-		tgt = &ri->tty_slaves;
-
-	list_add_tail(&fle->ps_list, tgt);
+		collect_gen_fd(fle, ri);
+	else {
+		if (info->driver->type == TTY_TYPE__CTTY)
+			tgt = &ri->tty_ctty;
+		else
+			tgt = &ri->tty_slaves;
+		list_add_tail(&fle->ps_list, tgt);
+	}
 }
 
 static char *tty_d_name(struct file_desc *d, char *buf, size_t s)



More information about the CRIU mailing list