Home | History | Annotate | Download | only in gen
History log of /src/lib/libc/gen/getttyent.c
RevisionDateAuthorComments
 1.26  30-Jun-2013  martin Rearrange to make lint deal with it (to unbreak the build).
Someone please (1) fix lint and then (2) back this out ;-)
 1.25  30-Jun-2013  matt When opening a ttys files, try path.<machine> first. This helps
machine archs which have multiple ttys files (arm, mips, powerpc, m68k, sh3)
 1.24  15-Oct-2011  christos branches: 1.24.2; 1.24.8;
close on exec fixes:
- open + fcntl -> open O_CLOEXEC
- configuration database file descriptors that can stay open are now opened
fopen(db, "re")
 1.23  17-Apr-2006  salo Add setttyentpath(), functionally equivalent to setttyent() but takes an
additional argument to read the ttys information from an alternate path
istead of _PATH_TTYS.

Required for upcoming init(8) changes.

Mostly from <apb>.

Bump libc minor.
 1.22  14-May-2005  christos make sure ty_class is cleared on each entry.
 1.21  10-Nov-2004  christos branches: 1.21.2;
PR/28183: Brian Marcotte: Getty eats the last character of the last field.
As Brian reports the bug is in skip(). The logic on end of line is broken.

- fix the bug which can cause buf[-1] to be written.
- don't leave the line buffer allocated on end of file.
- KNF
- use __func__ instead of hard-coding the function name.
- don't use needlessly global variables
 1.20  07-Aug-2003  agc branches: 1.20.4;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.19  20-Apr-2003  christos PR/5265: John Buller: ttyflags does not report syntax errors or unknown
tty options in /etc/ttys
Make this use fparseln and use warn and warnx to report problems.
 1.18  07-Jul-2000  itohy Passing "char" values to ctype(3) functions is problematic.
If an argument of a ctype function is outside "unsigned char"
and if it is not EOF, the behavior is undefined.

The isascii(3) is the sole exception of above and it was used to
be used to check a value was valid for other ctype functions in
ancient systems. On modern systems, the ctype functions take
all values of "unsigned char", and this check is obsolete and
even wrong for non-ASCII systems. However, we leave the isascii()
untouched for now, so as not to change the current behavior.
 1.17  22-Jan-2000  mycroft Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.
 1.16  20-Sep-1999  lukem back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.
 1.15  16-Sep-1999  lukem * use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

_DIAGASSERT(path != NULL)
#ifdef _DIAGNOSTIC
if (path == NULL) {
errno = EFAULT;
return (-1);
}
#endif
 1.14  15-Jan-1999  tsarna Add a "class" entry to ttyent. Closes PR#4638.
 1.13  03-Feb-1998  perry remove obsolete register declarations
 1.12  20-Oct-1997  scottr Add support for DTR/CTS flow control, from Bill Studenmund.
 1.11  21-Jul-1997  jtc If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore. The library will use those
names internally. Weak aliases are used to provide the original names
to the API.

This is only the first part of this change. It is most of the functions
which are implemented in C for all NetBSD ports. Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
 1.10  13-Jul-1997  christos Fix gcc warnings
Add missing prototypes
Fix RCSID's
 1.9  16-Jun-1995  jtc branches: 1.9.4;
Don't cast void functions to void.
 1.8  27-Feb-1995  cgd update from Lite, with local changes. fix Ids, etc.
 1.7  30-Mar-1994  cgd oops!
 1.6  18-Mar-1994  cgd update for new flag
 1.5  12-Mar-1994  cgd add some new flags for /etc/ttys' status field
 1.4  24-Nov-1993  jtc Change C library functions to use strchr() and strrchr() instead of index()
and rindex(). This will allow (strict {ANSI, POSIX, XOPEN}) applications
to redefine index() and rindex() without effecting the library internals.
 1.3  26-Aug-1993  jtc Declare rcsid strings so they are stored in text segment.
 1.2  30-Jul-1993  mycroft Add even more RCS frobs.
 1.1  21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2  25-Feb-1995  cgd from lite, with minor name rearrangement to fit.
 1.1.1.1  21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.9.4.1  19-Sep-1996  jtc snapshot namespace cleanup: gen
 1.20.4.1  13-May-2005  riz Pull up revision 1.21 (requested by is in ticket #1396):
PR/28183: Brian Marcotte: Getty eats the last character of the last field.
As Brian reports the bug is in skip(). The logic on end of line is broken.
- fix the bug which can cause buf[-1] to be written.
- don't leave the line buffer allocated on end of file.
- KNF
- use __func__ instead of hard-coding the function name.
- don't use needlessly global variables
 1.21.2.1  05-Jul-2005  tron Pull up revision 1.22 (requested by lukem in ticket #528):
make sure ty_class is cleared on each entry.
 1.24.8.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.24.2.1  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")

RSS XML Feed