[CRIU] [PATCH 1/2] tty: Add missing break statement

Cyrill Gorcunov gorcunov at gmail.com
Wed May 11 08:22:45 PDT 2016


On Wed, May 11, 2016 at 06:09:08PM +0300, Dmitry Safonov wrote:
> On 05/11/2016 06:01 PM, Cyrill Gorcunov wrote:
> > Being miss in first place.
> 
> Hi Cyrill,
> 
> > Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> > ---
> >  criu/tty.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/criu/tty.c b/criu/tty.c
> > index c6e8e32b7013..5a93cd714b09 100644
> > --- a/criu/tty.c
> > +++ b/criu/tty.c
> > @@ -275,6 +275,7 @@ struct tty_driver *get_tty_driver(dev_t rdev, dev_t dev)
> >  			 */
> >  			return &vt_driver;
> >  		/* Other minors points to UART serial ports */
> > +		break;
> 
> Maybe break under `if (minor == 0)`?
> I mean, other minors are for /dev/ttyS*, which seems to quite fit into
> serial console driver handeling (if I don't miss something).

No no. For tty-major we either should understand the driver
we're handling, in the code above it's VT driver, so if minor
is pointing somewhere else -- it's unknown tty.

Dima, while you're here. why your serial_driver doesn't
provide driver::index field? The ext-tty doesnt provide
as well but I think it's a mistake.

> 
> >  	case USB_SERIAL_MAJOR:
> >  	case LOW_DENSE_SERIAL_MAJOR:
> >  		return &serial_driver;
> > 
> 
> 
> -- 
> Regards,
> Dmitry Safonov
> 

	Cyrill


More information about the CRIU mailing list