[CRIU] [PATCH 9/9] tty: Add support of /dev/console

Cyrill Gorcunov gorcunov at gmail.com
Thu Oct 23 07:09:15 PDT 2014


On Thu, Oct 23, 2014 at 06:02:31PM +0400, Pavel Emelyanov wrote:
> On 10/16/2014 02:27 PM, Cyrill Gorcunov wrote:
> > /dev/console is a system console which provided
> > by the system with major 5 and minor 1. It's usually
> > configured on system startup with console= option
> > and underlied driver is resposible to deliver messages
> > to the console user.
> 
> Why don't we have a test for it? Sine you're using the
> regfiles engine you can just mknod("$test/foo", "c", 5, 1)
> and go ahead with it.

Yeah, I'll do, thanks.

> 
> > Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> > ---
> 
> > @@ -1305,9 +1374,19 @@ static int dump_one_pty(int lfd, u32 id, const struct fd_parms *p)
> >  		return -1;
> >  
> >  	type = tty_type(major(p->stat.st_rdev), minor(p->stat.st_rdev));
> > -	index = parse_pty_index(id, lfd, p, type);
> > -	if (index < 0)
> > -		return -1;
> > +	switch (type) {
> 
> Move this switch into parse_pty_index, it does switch (type) anyway.

As its name implies -- it has nothing to do with other types.
Lets better drop parse_pty_index and simply parse indices here
inplace.


More information about the CRIU mailing list