[CRIU] [PATCH 5/5] tty: allocate a separate tty info id for each external tty
Andrey Vagin
avagin at virtuozzo.com
Tue Oct 2 03:48:46 MSK 2018
On Thu, Sep 27, 2018 at 10:42:22AM +0300, Cyrill Gorcunov wrote:
> On Thu, Sep 27, 2018 at 10:01:49AM +0300, Andrei Vagin wrote:
> >
> > +static int ext_fd_get_index(int fd, const struct fd_parms *p)
> > +{
> > + static int index;
> > +
> > + index++;
> > +
> > + if (index + ETTY_INDEX > ETTY_INDEX_MAX) {
> > + pr_err("Too many external terminals");
> > + return INDEX_ERR;
> > + }
> > +
> > + return index;
> > +}
>
> Should not here be
>
> return index + ETTY_INDEX;
>
> instead? Other than that looks ok to me.
Oops. You are right. Thanks!
More information about the CRIU
mailing list