[CRIU] [RFC 1/2] tty: fix /dev/tty{1,63} minor number

Dmitry Safonov dsafonov at virtuozzo.com
Wed Apr 27 10:10:53 PDT 2016


Seems like, device with TTY_MAJOR major and minor MIN_NR_CONSOLES
is pointing to /dev/tty1 (first vitual console) and MAX_NR_CONSOLES
is /dev/tty63.

Cc: Cyrill Gorcunov <gorcunov at openvz.org>
Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
---
 criu/tty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/criu/tty.c b/criu/tty.c
index 68d7ba3d133b..7c634e19ebc0 100644
--- a/criu/tty.c
+++ b/criu/tty.c
@@ -261,7 +261,7 @@ struct tty_driver *get_tty_driver(dev_t rdev, dev_t dev)
 			return &ctty_driver;
 		break;
 	case TTY_MAJOR:
-		if (minor > MIN_NR_CONSOLES && minor < MAX_NR_CONSOLES)
+		if (minor >= MIN_NR_CONSOLES && minor <= MAX_NR_CONSOLES)
 			/*
 			 * Minors [MIN_NR_CONSOLES; MAX_NR_CONSOLES] stand
 			 * for consoles (virtual terminals, VT in terms
-- 
2.8.0



More information about the CRIU mailing list