[CRIU] [PATCH 1/6] tty: Rework tty_driver structure

Cyrill Gorcunov gorcunov at gmail.com
Thu Apr 2 08:12:47 PDT 2015


On Thu, Apr 02, 2015 at 06:04:41PM +0300, Pavel Emelyanov wrote:
> 
> > @@ -182,19 +180,16 @@ static struct tty_driver ptm_driver = {
> >  static int open_simple_tty(struct tty_info *info);
> >  
> >  static struct tty_driver console_driver = {
> > -	.t			= TTY_TYPE_CONSOLE,
> > -	.flags			= TTY_MASTER,
> > +	.type			= TTY_TYPE__CONSOLE,
> > +	.subtype		= TTY_SUBTYPE_SLAVE,
> 
> Why slave? This breaks some codepaths below.

Which one it breaks? The console is a slave by definition.
If you mean tty_is_master() helper then it's different
context -- it means we don't have to open master peer
for it, and because the console is special and the program
only has one peer of it (always) that's why it is slave
by nature but "master" in terms of criu.


More information about the CRIU mailing list