=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/lock/lock.c,v retrieving revision 1.13 retrieving revision 1.14 diff -c -r1.13 -r1.14 *** src/usr.bin/lock/lock.c 2001/05/29 21:38:15 1.13 --- src/usr.bin/lock/lock.c 2001/11/02 16:25:11 1.14 *************** *** 1,4 **** ! /* $OpenBSD: lock.c,v 1.13 2001/05/29 21:38:15 millert Exp $ */ /* $NetBSD: lock.c,v 1.8 1996/05/07 18:32:31 jtc Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: lock.c,v 1.14 2001/11/02 16:25:11 deraadt Exp $ */ /* $NetBSD: lock.c,v 1.8 1996/05/07 18:32:31 jtc Exp $ */ /* *************** *** 47,53 **** #if 0 static char sccsid[] = "@(#)lock.c 8.1 (Berkeley) 6/6/93"; #endif ! static char rcsid[] = "$OpenBSD: lock.c,v 1.13 2001/05/29 21:38:15 millert Exp $"; #endif /* not lint */ /* --- 47,53 ---- #if 0 static char sccsid[] = "@(#)lock.c 8.1 (Berkeley) 6/6/93"; #endif ! static char rcsid[] = "$OpenBSD: lock.c,v 1.14 2001/11/02 16:25:11 deraadt Exp $"; #endif /* not lint */ /* *************** *** 223,238 **** hi(dummy) int dummy; { time_t now; ! (void)fprintf(stderr, "%s: type in the unlock key.", __progname); ! if (!no_timeout) { now = time(NULL); ! (void)fprintf(stderr, " timeout in %d:%d minutes", ! (nexttime - now) / 60, ! (nexttime - now) % 60); } ! putc('\n', stderr); } void --- 223,241 ---- hi(dummy) int dummy; { + char buf[1024], buf2[1024]; time_t now; ! if (no_timeout) ! buf2[0] = '\0'; ! else { now = time(NULL); ! (void)snprintf(buf2, sizeof buf2, " timeout in %d:%d minutes", ! (nexttime - now) / 60, (nexttime - now) % 60); } ! snprintf(buf, sizeof buf, "%s: type in the unlock key.%s\n", ! __progname, buf2); ! (void) write(STDERR_FILENO, buf, strlen(buf)); } void