*BSD News Article 49316


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!yarrina.connect.com.au!warrane.connect.com.au!godzilla.zeta.org.au!not-for-mail
From: bde@zeta.org.au (Bruce Evans)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: stty with option "-D"?
Date: 23 Aug 1995 22:30:57 +1000
Organization: Kralizec Dialup Unix Sydney - +61-2-837-1183, v.32bis v.42bis
Lines: 31
Message-ID: <41f721$k1c@godzilla.zeta.org.au>
References: <419qks$r3c@bonnie.tcd-dresden.de> <41akuh$lku@newsgate.sps.mot.com> <41cm4m$25g@bonnie.tcd-dresden.de>
NNTP-Posting-Host: godzilla.zeta.org.au

In article <41cm4m$25g@bonnie.tcd-dresden.de>,
J Wunsch <joerg_wunsch@uriah.heep.sax.de> wrote:
>Tushar Patel,430,X8847 <tusharp@oakhill.sps.mot.com> wrote:
>>Tushar Patel <tushar@ecpi.com> wrote:
>>>I want to make my stty work with the -D option. What do I need to
>>>do? Do I have to recompile the kernel?
>>
>>>What the hell should the -D option be?
>>
>>  -D      Display or set the system default settings rather than those for
>>             the current device.  The system defaults are used when a device
>>             is initially opened.  The system defaults may be set only by the
>>             superuser.
>
>Ah.
>
>Well, you would have to hack the kernel.  I'm not even sure whether
>the ttydefaults are actually taken from a variable or rather from a
>macro at kernel compile time.

They are partly macros and partly port-specific variables.  For some
drivers, the port-specific initial settings are stored in special
devices so that they can be accessed using ordinary stty.  You can
easily get part of the -D behaviour (for some drivers) by
programming all initial settings to the same thing.  Changing the
initial settings (yet) doesn't affect the behaviour of things like
`reset' and `stty sane' - fixed defaults are used.  You can also
lock the initial settings by using ordinary stty on other special
devices.
-- 
Bruce Evans  bde@zeta.org.au