projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
no more hostname stuff
[unix-history]
/
usr
/
src
/
usr.bin
/
login
/
login.c.1
diff --git
a/usr/src/usr.bin/login/login.c.1
b/usr/src/usr.bin/login/login.c.1
index
04ef8b2
..
bdfeadb
100644
(file)
--- a/
usr/src/usr.bin/login/login.c.1
+++ b/
usr/src/usr.bin/login/login.c.1
@@
-1,5
+1,5
@@
#ifndef lint
#ifndef lint
-static char *sccsid = "@(#)login.c.1 4.2
5 (Berkeley) 83/05/23
";
+static char *sccsid = "@(#)login.c.1 4.2
7 (Berkeley) 83/05/24
";
#endif
/*
#endif
/*
@@
-314,12
+314,11
@@
getloginname(up)
register struct utmp *up;
{
register char *namep;
register struct utmp *up;
{
register char *namep;
- char
hostname[32],
c;
+ char c;
- gethostname(hostname, sizeof (hostname));
while (up->ut_name[0] == '\0') {
namep = utmp.ut_name;
while (up->ut_name[0] == '\0') {
namep = utmp.ut_name;
- printf("
%s login: ", hostname
);
+ printf("
login: "
);
while ((c = getchar()) != '\n') {
if (c == ' ')
c = '_';
while ((c = getchar()) != '\n') {
if (c == ' ')
c = '_';
@@
-531,5
+530,13
@@
doremoteterm(term, tp)
logerr(fmt, a1, a2, a3)
char *fmt, *a1, *a2, *a3;
{
logerr(fmt, a1, a2, a3)
char *fmt, *a1, *a2, *a3;
{
+#ifdef LOGERR
+ FILE *cons = fopen("/dev/console", "w");
+ if (cons != NULL) {
+ fprintf(cons, fmt, a1, a2, a3);
+ fputc('\r', cons);
+ fclose(cons);
+ }
+#endif
}
}