lock.c (216696) | lock.c (216737) |
---|---|
1/* 2 * Copyright (c) 1980, 1987, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Bob Toxen. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 28 unchanged lines hidden (view full) --- 37#endif /* not lint */ 38 39#ifndef lint 40#if 0 41static char sccsid[] = "@(#)lock.c 8.1 (Berkeley) 6/6/93"; 42#endif 43#endif /* not lint */ 44#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1980, 1987, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Bob Toxen. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 28 unchanged lines hidden (view full) --- 37#endif /* not lint */ 38 39#ifndef lint 40#if 0 41static char sccsid[] = "@(#)lock.c 8.1 (Berkeley) 6/6/93"; 42#endif 43#endif /* not lint */ 44#include <sys/cdefs.h> |
45__FBSDID("$FreeBSD: head/usr.bin/lock/lock.c 216696 2010-12-25 11:24:27Z ed $"); | 45__FBSDID("$FreeBSD: head/usr.bin/lock/lock.c 216737 2010-12-27 15:05:15Z ed $"); |
46 47/* 48 * Lock a terminal up until the given key is entered or the given 49 * interval times out. 50 * 51 * Timeout interval is by default TIMEOUT, it can be changed with 52 * an argument of the form -time where time is in minutes 53 */ --- 139 unchanged lines hidden (view full) --- 193 (void)tcsetattr(0, TCSADRAIN|TCSASOFT, &tty); 194 err(1, "locking vty"); 195 } 196 vtyunlock = 0x2; 197 } 198 199 /* header info */ 200 if (pw != NULL) | 46 47/* 48 * Lock a terminal up until the given key is entered or the given 49 * interval times out. 50 * 51 * Timeout interval is by default TIMEOUT, it can be changed with 52 * an argument of the form -time where time is in minutes 53 */ --- 139 unchanged lines hidden (view full) --- 193 (void)tcsetattr(0, TCSADRAIN|TCSASOFT, &tty); 194 err(1, "locking vty"); 195 } 196 vtyunlock = 0x2; 197 } 198 199 /* header info */ 200 if (pw != NULL) |
201 (void)printf("lock: %s using %s on %s.", pw->pw_name, ttynam, hostname); | 201 (void)printf("lock: %s using %s on %s.", pw->pw_name, 202 ttynam, hostname); |
202 else 203 (void)printf("lock: %s on %s.", ttynam, hostname); 204 if (no_timeout) 205 (void)printf(" no timeout."); 206 else 207 (void)printf(" timeout in %d minute%s.", sectimeout, 208 sectimeout != 1 ? "s" : ""); 209 if (vtylock) --- 82 unchanged lines hidden --- | 203 else 204 (void)printf("lock: %s on %s.", ttynam, hostname); 205 if (no_timeout) 206 (void)printf(" no timeout."); 207 else 208 (void)printf(" timeout in %d minute%s.", sectimeout, 209 sectimeout != 1 ? "s" : ""); 210 if (vtylock) --- 82 unchanged lines hidden --- |