diff options
Diffstat (limited to 'libexec/getty')
-rw-r--r-- | libexec/getty/gettytab.5 | 11 | ||||
-rw-r--r-- | libexec/getty/main.c | 28 |
2 files changed, 4 insertions, 35 deletions
diff --git a/libexec/getty/gettytab.5 b/libexec/getty/gettytab.5 index 834e979..db6b1cc 100644 --- a/libexec/getty/gettytab.5 +++ b/libexec/getty/gettytab.5 @@ -220,15 +220,10 @@ and .Em \&lm may include the character sequence .Em \&%h -to include the hostname, +or .Em \&%t -to obtain the tty name, -.Em \&%s -to obtain the OS type (FreeBSD), -.Em \&%r -to obtain the OS release string or -.Em \&%m -to obtain the machine architecture type. +to obtain +the hostname or tty name respectively. .Pf ( Em %% obtains a single '%' character.) The hostname is normally obtained from the system, diff --git a/libexec/getty/main.c b/libexec/getty/main.c index d0cf1b9..a161ed5 100644 --- a/libexec/getty/main.c +++ b/libexec/getty/main.c @@ -56,7 +56,6 @@ static char sccsid[] = "@(#)main.c 5.16 (Berkeley) 3/27/91"; #include <ctype.h> #include <stdlib.h> #include <string.h> -#include <sys/utsname.h> #include "gettytab.h" #include "pathnames.h" @@ -455,7 +454,6 @@ putf(cp) break; case 'h': - case 'n': puts(editedhost); break; @@ -466,32 +464,8 @@ putf(cp) (void)time(&t); (void)strftime(db, sizeof(db), fmt, localtime(&t)); puts(db); + break; } - break; - - case 's': { - struct utsname name; - - if (uname(&name) != -1) - puts(name.sysname); - } - break; - - case 'r': { - struct utsname name; - - if (uname(&name) != -1) - puts(name.release); - } - break; - - case 'm': { - struct utsname name; - - if (uname(&name) != -1) - puts(name.machine); - } - break; case '%': putchr('%'); |