lkml.org 
[lkml]   [2000]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: design-question serial-driver + predefined ldisc - Nuber
Hallo,

On Thu, Aug 10, 2000 at 10:26:50AM -0400, Theodore Ts'o wrote:
> I hav a projekt for POS-Systeme with a few driver's that
> all use a protokoll over the serial device.
> I think it is a goo idea when i use the ldisc mechanism
> from the tty driver.
>
> My problem is that the ldiscs array in tty_io.c is static
> predefined. I have 3 to 10 protokoll's over this mechnism.
>
> I think it is a good idea, to create a dynamic part on the ldiscs
> structure.
>
> So your idea is to have a range of line discplines from N_LDDYN and
> NR_LDISCS would be dynamically allocated? It seems like a good concept,
> but (a) not for Linux 2.4, (b) don't overload the return value of
> tty_register_ldisc (it's ugly, ugly, ugly), and (c) the dynamic line
> discplines (and arguably all of the other line discplines, in the long
> run) should probably use an ASCII string instead of a number to address
> them.
>
> Linus hates magic numbers, and while in some cases they are necessary,
> line discplines are a perfect example of where a new ioctl where you
> pass in a 32 byte character array containing a null-terminated string
> naming the line discpline you want is almost certainly the Right Thing.
> Unfortunately, it's not for 2.4, but that's probably the right approach
> to use, and hopefully we can merge a patch like that in once the 2.5
> development opens.
>

I'm agree this, it is a very good Idea, to use Stings ;-).
OK in this time, I use (missbrow) a existing descriptor over the
modul-alias mechanism. The driver is very very spezially Protokoll,
with a z8530 driver on i386. I plan in the next time, to merge
the 4..5 z8530 drivers to one modul, but i have only a i386 box.

thank's


Michael




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

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.342 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site