Re: [PATCH 60/80] tty: extract the pty init time special cases

From: bmckinlay
Date: Wed Jan 21 2009 - 21:21:39 EST


My question/comment is in regards to the following patch indicated below
that was posted on October 13, 2008.

> From Alan Cox <>
> Subject [PATCH 60/80] tty: extract the pty init time special cases
> Date Mon, 13 Oct 2008 10:42:39 +0100
>
> From: Alan Cox <alan@xxxxxxxxxx>
>
> The majority of the remaining init_dev code is pty special cases. We
> refactor this code into the driver->install method.
>
> Signed-off-by: Alan Cox <alan@xxxxxxxxxx>
> ---
> drivers/char/pty.c | 126 ++++++++++++++++++++++++++++---
> drivers/char/tty_io.c | 198
+++++++++++++++++--------------------------------
> include/linux/tty.h | 5 +
> 3 files changed, 187 insertions(+), 142 deletions(-)
>

This patch seems to break any other pseudo tty drivers, (ie driver->type
==TTY_DRIVER_TYPE_PTY) since not all the tty functions needed for the
driver's new driver->install method are exported from tty_io.c. The
function symbols that need to be exported from /drivers/char/tty_io.c are
the following:

EXPORT_SYMBOL_GPL(alloc_tty_struct);
EXPORT_SYMBOL_GPL(free_tty_struct);
EXPORT_SYMBOL_GPL(tty_init_termios);
EXPORT_SYMBOL_GPL(initialize_tty_struct);

I've added these lines and recompiled a 2.6.28 kernel along with adding
new driver->install methods to my master and slave pseudo tty driver and
it seems to work fine now.

Before I go ahead and post a patch, does anyone see any problems with
this?




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/