[CRIU] [PATCH 1/2] tty: Make parasite to consider major and minors
Cyrill Gorcunov
gorcunov at gmail.com
Thu Oct 9 05:18:49 PDT 2014
On Thu, Oct 09, 2014 at 03:35:15PM +0400, Pavel Emelyanov wrote:
> > +
> > + __tty_ioctl(TIOCGSID, args->sid);
> > + __tty_ioctl(TIOCGPGRP, args->pgrp);
> > + switch (args->major) {
> > + case TTYAUX_MAJOR:
> > + if (args->minor == 0 || args->minor == 2) {
> > + __tty_ioctl(TIOCGPKT, args->st_pckt);
> > + __tty_ioctl(TIOCGPTLCK, args->st_lock);
> > + }
> > + break;
> > + case UNIX98_PTY_MASTER_MAJOR ... (UNIX98_PTY_MASTER_MAJOR + UNIX98_PTY_MAJOR_COUNT - 1):
> > + case UNIX98_PTY_SLAVE_MAJOR:
> > + __tty_ioctl(TIOCGPKT, args->st_pckt);
> > + __tty_ioctl(TIOCGPTLCK, args->st_lock);
> > + break;
> > + }
>
> Please, don't re-introduce this switch() for the 3rd time. Make
> all the decisions in files.c and go to parasite with simple questions :)
Look, TIOCGPTLCK | TIOCGPKT should not be called on anything but
pty peers so I either need to introduce own types and use "case"
statement somewhere in files.c, or continue using "case" here.
More information about the CRIU
mailing list