[CRIU] [PATCH 1/2] tty: add vt support, v2

Cyrill Gorcunov gorcunov at gmail.com
Fri Dec 19 08:32:03 PST 2014


On Fri, Dec 19, 2014 at 07:28:00PM +0300, Pavel Emelyanov wrote:
> On 12/19/2014 07:20 PM, Cyrill Gorcunov wrote:
> > On Fri, Dec 19, 2014 at 07:05:54PM +0300, Pavel Emelyanov wrote:
> >>
> >>> diff --git a/tty.c b/tty.c
> >>> index b076f06..7b184c7 100644
> >>> --- a/tty.c
> >>> +++ b/tty.c
> >>> @@ -118,6 +118,7 @@ static LIST_HEAD(all_ttys);
> >>>  #define MAX_TTYS	1024
> >>>  #define MAX_PTY_INDEX	1000
> >>>  #define CONSOLE_INDEX	1002
> >>> +#define VT_INDEX	1004
> >>
> >> 1004? Why not 1003 or 1005?
> > 
> > I'm not sure about shell_job, but for indices -- better to
> > use odd numbers here in case if we need pairs one day,
> > so leave an even holes here.
> 
> I don't mind, but let's comment this fact in the code.

OK. Ruslan add a comment please right after #define MAX_TTYS

/*
 * Custom indices should be odd numbers just in case if we
 * need evens for pair numbering someday.
 */


More information about the CRIU mailing list