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

Pavel Emelyanov xemul at parallels.com
Thu Apr 2 08:04:41 PDT 2015


> @@ -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.

>  	.name			= "console",
> -	.img_type		= TTY_TYPE__CONSOLE,
>  	.index			= CONSOLE_INDEX,
>  	.open			= open_simple_tty,
>  };
>  
>  static struct tty_driver vt_driver = {
> -	.t			= TTY_TYPE_VT,
> -	.flags			= 0,
> +	.type			= TTY_TYPE__VT,
>  	.name			= "vt",
> -	.img_type		= TTY_TYPE__VT,
>  	.index			= VT_INDEX,
>  	.open			= open_simple_tty,
>  };



More information about the CRIU mailing list