Re: [PATCH 3.13 35/99] tty: Set correct tty name in active sysfs attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

(resending because my phone tried to send the reply as html mail and
it got rejected)

On Sat, Feb 22, 2014 at 9:27 AM, David Herrmann <dh.herrmann@xxxxxxxxx> wrote:
> > How about this:
>
> +               driver = cs[i]->device(cs[i], &index);
> +                /* special case for tty0 which must not be resolved */
> +               if (driver && (index > 0 || cs[i]->major != TTY_MAJOR)) {
> +                       count += tty_line_name(driver, index, buf + count);
> +                       count += sprintf(buf + count, "%c", i ? ' ':'\n');
> +               } else
> +                       count += sprintf(buf + count, "%s%d%c",
> +                                        name, index, i ? ' ':'\n');
Assuming I'm reading the code correctly, I don't think that will work.
 Index will be rewritten from 0 to fg_console (which I suppose is
going to be 1) after the device vfunc is called.

--Ray
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]