diff options
author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2018-02-04 19:05:13 +0000 |
---|---|---|
committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2018-02-04 19:05:13 +0000 |
commit | 9c33cc93cd2a7144211244ef0ffdececf2ad8a9e (patch) | |
tree | 59005ae3930e1a9075d16516d715e8be9f7722ae /libexec/getty | |
parent | 1776dc9fd690f5ab0c6e56fa5e4c630997691056 (diff) | |
download | src-9c33cc93cd2a7144211244ef0ffdececf2ad8a9e.tar.gz src-9c33cc93cd2a7144211244ef0ffdececf2ad8a9e.zip |
Notes
Diffstat (limited to 'libexec/getty')
-rw-r--r-- | libexec/getty/extern.h | 2 | ||||
-rw-r--r-- | libexec/getty/main.c | 28 | ||||
-rw-r--r-- | libexec/getty/subr.c | 2 |
3 files changed, 16 insertions, 16 deletions
diff --git a/libexec/getty/extern.h b/libexec/getty/extern.h index 3e01943e2c59..fbee272d109c 100644 --- a/libexec/getty/extern.h +++ b/libexec/getty/extern.h @@ -35,6 +35,8 @@ struct delayval; struct termios; +extern char **environ; +extern char editedhost[]; extern char hostname[]; extern struct termios tmode, omode; extern struct gettyflags gettyflags[]; diff --git a/libexec/getty/main.c b/libexec/getty/main.c index c90def6cb1d6..d37429db28c8 100644 --- a/libexec/getty/main.c +++ b/libexec/getty/main.c @@ -93,23 +93,23 @@ struct termios omode; /* current mode */ struct termios tmode; -int crmod, digit, lower, upper; +static int crmod, digit, lower, upper; char hostname[MAXHOSTNAMELEN]; -char name[MAXLOGNAME*3]; -char dev[] = _PATH_DEV; -char ttyn[32]; +static char name[MAXLOGNAME*3]; +static char dev[] = _PATH_DEV; +static char ttyn[32]; #define OBUFSIZ 128 #define TABBUFSIZ 512 -char defent[TABBUFSIZ]; -char tabent[TABBUFSIZ]; -const char *tname; +static char defent[TABBUFSIZ]; +static char tabent[TABBUFSIZ]; +static const char *tname; -char *env[128]; +static char *env[128]; -char partab[] = { +static char partab[] = { 0001,0201,0201,0001,0201,0001,0001,0201, 0202,0004,0003,0205,0005,0206,0201,0001, 0201,0001,0001,0201,0001,0201,0201,0001, @@ -150,7 +150,7 @@ static char *get_line(int); static void setttymode(int); static int opentty(const char *, int); -jmp_buf timeout; +static jmp_buf timeout; static void dingdong(int signo __unused) @@ -159,7 +159,7 @@ dingdong(int signo __unused) longjmp(timeout, 1); } -jmp_buf intrupt; +static jmp_buf intrupt; static void interrupt(int signo __unused) @@ -181,7 +181,6 @@ timeoverrun(int signo __unused) int main(int argc, char *argv[]) { - extern char **environ; int first_sleep = 1, first_time = 1; struct rlimit limit; int rval; @@ -666,8 +665,8 @@ puts(const char *s) putchr(*s++); } -char outbuf[OBUFSIZ]; -int obufcnt = 0; +static char outbuf[OBUFSIZ]; +static int obufcnt = 0; static void putchr(int cc) @@ -733,7 +732,6 @@ get_line(int fd) static void putf(const char *cp) { - extern char editedhost[]; time_t t; char *slash, db[100]; diff --git a/libexec/getty/subr.c b/libexec/getty/subr.c index 96989c5d5e06..741a98de24b0 100644 --- a/libexec/getty/subr.c +++ b/libexec/getty/subr.c @@ -588,7 +588,7 @@ makeenv(char *env[]) * baud rate. This string indicates the user's actual speed. * The routine below returns the terminal type mapped from derived speed. */ -struct portselect { +static struct portselect { const char *ps_baud; const char *ps_type; } portspeeds[] = { |