summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1997-11-21 07:43:53 +0000
committercharnier <charnier@FreeBSD.org>1997-11-21 07:43:53 +0000
commitf2586e9eaba48373007d28b326ddcbf5c07acd98 (patch)
tree5d9e323b8dd216202dd9ecf415ea6e5cbfe6291a /libexec
parent8191848c3fe6cf7a39563a64975e0b607295e35d (diff)
downloadFreeBSD-src-f2586e9eaba48373007d28b326ddcbf5c07acd98.zip
FreeBSD-src-f2586e9eaba48373007d28b326ddcbf5c07acd98.tar.gz
Correct incompletes .Xrs. Remove duplicate #includes and unused variables.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/getty/chat.c17
-rw-r--r--libexec/getty/getty.820
-rw-r--r--libexec/getty/gettytab.517
-rw-r--r--libexec/getty/init.c7
-rw-r--r--libexec/getty/main.c19
-rw-r--r--libexec/getty/subr.c18
-rw-r--r--libexec/getty/ttys.512
7 files changed, 58 insertions, 52 deletions
diff --git a/libexec/getty/chat.c b/libexec/getty/chat.c
index 964564e..af509f0 100644
--- a/libexec/getty/chat.c
+++ b/libexec/getty/chat.c
@@ -21,21 +21,21 @@
*
* Modem chat module - send/expect style functions for getty
* For semi-intelligent modem handling.
- *
- * $Id: chat.c,v 1.3 1997/02/22 14:21:36 peter Exp $
*/
+#ifndef lint
+static const char rcsid[] =
+ "$Id$";
+#endif /* not lint */
+
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/resource.h>
#include <sys/ttydefaults.h>
#include <sys/utsname.h>
-#include <errno.h>
-#include <signal.h>
-#include <fcntl.h>
-#include <time.h>
#include <ctype.h>
+#include <errno.h>
#include <fcntl.h>
#include <libutil.h>
#include <locale.h>
@@ -44,8 +44,8 @@
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
-#include <termios.h>
#include <time.h>
+#include <termios.h>
#include <unistd.h>
#include <sys/socket.h>
@@ -169,8 +169,6 @@ read_chat(chatstr)
/* Read escapes */
for (q = r = (unsigned char *)p; *r; ++q)
{
- int val;
-
if (*q == '\\')
{
/* handle special escapes */
@@ -480,7 +478,6 @@ getty_chat(scrstr, timeout, debug)
int i = r = 0;
int off = 0;
sig_t old_alarm;
- struct termios tneed;
/*
* We need to be in raw mode for all this
diff --git a/libexec/getty/getty.8 b/libexec/getty/getty.8
index 0fe8e79..5492a91 100644
--- a/libexec/getty/getty.8
+++ b/libexec/getty/getty.8
@@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" from: @(#)getty.8 8.1 (Berkeley) 6/4/93
-.\" $Id: getty.8,v 1.7 1997/02/22 14:21:37 peter Exp $
+.\" $Id: getty.8,v 1.8 1997/08/17 16:36:41 steve Exp $
.\" "
.Dd June 4, 1993
.Dt GETTY 8
@@ -46,7 +46,7 @@
.Oc
.Sh DESCRIPTION
The
-.Nm getty
+.Nm
program
is called by
.Xr init 8
@@ -65,7 +65,7 @@ the tty line is assumed to be open as file descriptor 0.
The
.Ar type
argument can be used to make
-.Nm getty
+.Nm
treat the terminal line specially.
This argument is used as an index into the
.Xr gettytab 5
@@ -77,7 +77,7 @@ If there is no
.Pa /etc/gettytab
a set of system defaults is used.
If indicated by the table located,
-.Nm getty
+.Nm
will clear the terminal screen,
print a banner heading,
and prompt for a login name.
@@ -85,13 +85,13 @@ Usually either the banner or the login prompt will include
the system hostname.
.Pp
Most of the default actions of
-.Nm getty
+.Nm
can be circumvented, or modified, by a suitable
-.Nm gettytab
+.Pa gettytab
table.
.Pp
The
-.Nm getty
+.Nm
program
can be set to timeout after some interval,
which will cause dial up lines to hang up
@@ -100,9 +100,10 @@ if the login name is not entered reasonably quickly.
.Bl -diag
.It "ttyxx: No such device or address."
.It "ttyxx: No such file or address."
+.Pp
A terminal which is turned
on in the
-.Xr ttys
+.Pa ttys
file cannot be opened, likely because the requisite
lines are either not configured into the system, the associated device
was not attached during boot-time system configuration,
@@ -113,6 +114,7 @@ does not exist.
.Sh FILES
.Bl -tag -width /etc/gettytab -compact
.It Pa /etc/gettytab
+.It Pa /etc/ttys
.El
.Sh SEE ALSO
.Xr login 1 ,
@@ -123,6 +125,6 @@ does not exist.
.Xr init 8
.Sh HISTORY
A
-.Nm getty
+.Nm
program appeared in
.At v6 .
diff --git a/libexec/getty/gettytab.5 b/libexec/getty/gettytab.5
index 1a2834f..4971ec7 100644
--- a/libexec/getty/gettytab.5
+++ b/libexec/getty/gettytab.5
@@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" from: @(#)gettytab.5 8.4 (Berkeley) 4/19/94
-.\" $Id: gettytab.5,v 1.14 1997/02/22 14:21:38 peter Exp $
+.\" $Id: gettytab.5,v 1.15 1997/08/23 16:22:30 steve Exp $
.\" "
.Dd April 19, 1994
.Dt GETTYTAB 5
@@ -44,7 +44,7 @@
.Nm gettytab
.Sh DESCRIPTION
The
-.Nm gettytab
+.Nm
file
is a simplified version of the
.Xr termcap 5
@@ -53,7 +53,7 @@ used to describe terminal lines.
The initial terminal login process
.Xr getty 8
accesses the
-.Nm gettytab
+.Nm
file each time it starts, allowing simpler
reconfiguration of terminal characteristics.
Each entry in the data base
@@ -190,7 +190,8 @@ echo control chars as
.It "Lo str C the locale name used for \&%d in the banner message"
.El
.Pp
-The following capabilities are no longer supported by getty(8):
+The following capabilities are no longer supported by
+.Xr getty 8 Ns :
.Bl -column Namexx /usr/bin/login Default
.It "bd num 0 backspace delay"
.It "cb bool false use crt backspace mode"
@@ -374,7 +375,7 @@ string is specified and a PPP link bringup sequence is recognized,
getty will invoke the program referenced by the pp option. This
can be used to handle incoming PPP calls.
.Pp
-.Nm getty
+.Nm Getty
provides some basic intelligent modem handling by providing a chat
script feature available via two capabilities:
.Pp
@@ -387,7 +388,7 @@ Chat script to answer a call.
.Pp
A chat script is a set of expect/send string pairs.
When a chat string starts,
-.Nm Getty
+.Nm getty
will wait for the first string, and if it finds it, will send the
second, and so on.
Strings specified are separated by one or more tabs or spaces.
@@ -508,11 +509,11 @@ The
capability is stupid.
.Pp
The
-.Xr termcap
+.Xr termcap 5
format is horrid, something more rational should
have been chosen.
.Sh HISTORY
The
-.Nm gettytab
+.Nm
file format appeared in
.Bx 4.2 .
diff --git a/libexec/getty/init.c b/libexec/getty/init.c
index 9df0728..31c62a2 100644
--- a/libexec/getty/init.c
+++ b/libexec/getty/init.c
@@ -32,8 +32,11 @@
*/
#ifndef lint
-/*static char sccsid[] = "from: @(#)init.c 8.1 (Berkeley) 6/4/93";*/
-static char rcsid[] = "$Id$";
+#if 0
+static char sccsid[] = "@(#)from: init.c 8.1 (Berkeley) 6/4/93";
+#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
/*
diff --git a/libexec/getty/main.c b/libexec/getty/main.c
index cead481..d5ed46a 100644
--- a/libexec/getty/main.c
+++ b/libexec/getty/main.c
@@ -32,14 +32,17 @@
*/
#ifndef lint
-static char copyright[] =
+static const char copyright[] =
"@(#) Copyright (c) 1980, 1993\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#ifndef lint
-/*static char sccsid[] = "from: @(#)main.c 8.1 (Berkeley) 6/20/93";*/
-static char rcsid[] = "$Id: main.c,v 1.20 1997/06/03 12:56:47 davidn Exp $";
+#if 0
+static char sccsid[] = "@(#)from: main.c 8.1 (Berkeley) 6/20/93";
+#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
#include <sys/param.h>
@@ -48,14 +51,12 @@ static char rcsid[] = "$Id: main.c,v 1.20 1997/06/03 12:56:47 davidn Exp $";
#include <sys/resource.h>
#include <sys/ttydefaults.h>
#include <sys/utsname.h>
-#include <errno.h>
-#include <signal.h>
-#include <fcntl.h>
-#include <time.h>
#include <ctype.h>
+#include <errno.h>
#include <fcntl.h>
-#include <libutil.h>
#include <locale.h>
+#include <libutil.h>
+#include <signal.h>
#include <setjmp.h>
#include <signal.h>
#include <stdlib.h>
@@ -172,7 +173,7 @@ timeoverrun(signo)
int signo;
{
- syslog(LOG_ERR, "getty exiting due to excessive running time\n");
+ syslog(LOG_ERR, "getty exiting due to excessive running time");
exit(1);
}
diff --git a/libexec/getty/subr.c b/libexec/getty/subr.c
index 7bcffb9..c91c299 100644
--- a/libexec/getty/subr.c
+++ b/libexec/getty/subr.c
@@ -32,24 +32,28 @@
*/
#ifndef lint
-/*static char sccsid[] = "from: @(#)subr.c 8.1 (Berkeley) 6/4/93";*/
-static char rcsid[] = "$Id: subr.c,v 1.11 1997/09/01 10:06:05 davidn Exp $";
+#if 0
+static char sccsid[] = "@(#)from: subr.c 8.1 (Berkeley) 6/4/93";
+#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
/*
* Melbourne getty.
*/
#define COMPAT_43
+#ifdef DEBUG
+#include <stdio.h>
+#endif
#include <stdlib.h>
-#include <unistd.h>
#include <string.h>
#include <termios.h>
+#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/param.h>
+#include <sys/time.h>
#include <syslog.h>
-#ifdef DEBUG
-#include <stdio.h>
-#endif
#include "gettytab.h"
#include "pathnames.h"
@@ -802,8 +806,6 @@ portselector()
* portselector. Selection is done by looking at how the character '\r'
* is garbled at the different speeds.
*/
-#include <sys/time.h>
-
const char *
autobaud()
{
diff --git a/libexec/getty/ttys.5 b/libexec/getty/ttys.5
index 4130ab8..1123370 100644
--- a/libexec/getty/ttys.5
+++ b/libexec/getty/ttys.5
@@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" from: @(#)ttys.5 8.1 (Berkeley) 6/4/93
-.\" $Id: ttys.5,v 1.7 1997/04/13 21:29:50 davidn Exp $
+.\" $Id: ttys.5,v 1.8 1997/06/02 21:03:20 davidn Exp $
.\" "
.Dd November 17, 1996
.Dt TTYS 5
@@ -40,14 +40,14 @@
.Nd terminal initialization information
.Sh DESCRIPTION
The file
-.Nm ttys
+.Nm
contains information that is used by various routines to initialize
and control the use of terminal special files.
This information is read with the
.Xr getttyent 3
library routines.
There is one line in the
-.Nm ttys
+.Nm
file per special device file.
Fields are separated by tabs and/or spaces.
Fields comprised of more than one word should be enclosed in double
@@ -76,7 +76,7 @@ tty line, normally the one found in the
.Xr termcap 5
data base file.
The environment variable
-.Dv TERM
+.Ev TERM
is initialized with the value by
either
.Xr getty 8
@@ -99,7 +99,7 @@ deny access or enable or disable accounting facilities for
ttys as a group.
.Pp
As flag values, the strings ``on'' and ``off'' specify that
-.Xr init
+.Xr init 8
should (should not) execute the command given in the second field,
while ``secure'' (if ``on'' is also specified) allows users with a
uid of 0 to login on
@@ -111,7 +111,7 @@ Either of these strings may also be specified in the terminal type
field.
The string ``window='' may be followed by a quoted command
string which
-.Xr init
+.Xr init 8
will execute
.Em before
starting the command specified by the second field.
OpenPOWER on IntegriCloud