4.4BSD snapshot (revision 8.1); add 1993 to copyright
[unix-history] / usr / src / libexec / getty / ttydefaults.c
CommitLineData
1aa0bb57 1/*-
7e93bfe3
KB
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
1aa0bb57
KB
4 *
5 * %sccs.include.redist.c%
6 */
7
8#ifndef lint
7e93bfe3 9static char sccsid[] = "@(#)ttydefaults.c 8.1 (Berkeley) %G%";
1aa0bb57
KB
10#endif /* not lint */
11
12#include <sys/termios.h>
13
34129485
KB
14#include "extern.h"
15
16void
1aa0bb57
KB
17set_ttydefaults(fd)
18 int fd;
19{
20 struct termios term;
21
22 tcgetattr(fd, &term);
23 term.c_iflag = TTYDEF_IFLAG;
24 term.c_oflag = TTYDEF_OFLAG;
25 term.c_lflag = TTYDEF_LFLAG;
26 term.c_cflag = TTYDEF_CFLAG;
27 tcsetattr(fd, TCSAFLUSH, &term);
28}