From e91c4f7cc301262a34b7ab92db7f87fd5bf145b8 Mon Sep 17 00:00:00 2001 From: David Nugent Date: Sun, 2 Feb 1997 07:38:26 +0000 Subject: Fix bug in %s, %m, %r and %v macros not displaying data. --- libexec/getty/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libexec/getty') diff --git a/libexec/getty/main.c b/libexec/getty/main.c index 18afbf8e38aa..b0cdbc480b30 100644 --- a/libexec/getty/main.c +++ b/libexec/getty/main.c @@ -93,7 +93,6 @@ struct termios tmode, omode; int crmod, digit, lower, upper; char hostname[MAXHOSTNAMELEN]; -struct utsname kerninfo; char name[16]; char dev[] = _PATH_DEV; char ttyn[32]; @@ -566,6 +565,11 @@ putf(cp) time_t t; char *slash, db[100]; + static struct utsname kerninfo; + + if (!*kerninfo.sysname) + uname(&kerninfo); + while (*cp) { if (*cp != '%') { putchr(*cp++); -- cgit v1.3