summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJeremie Courreges-Anglas <jca@cvs.openbsd.org>2019-07-21 22:44:45 +0000
committerJeremie Courreges-Anglas <jca@cvs.openbsd.org>2019-07-21 22:44:45 +0000
commitc8755b8162172e68fd52d85c6af96c5efb19c6b5 (patch)
tree8d13aa59bf7abbafda34696cda9d2406d24152a9 /usr.bin
parent27bdfcab08d7914861bece963e0dabdbcd4554b8 (diff)
While -n is now the default, it's been useful since 1996. Keep it for compat.
Agreement from schwarze@ (who proposed a thorough but longer diff) and millert@ ok tb@ kn@ cheloha@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/lock/lock.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/lock/lock.c b/usr.bin/lock/lock.c
index 3a739cdc6ba..0e27d637a4e 100644
--- a/usr.bin/lock/lock.c
+++ b/usr.bin/lock/lock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lock.c,v 1.44 2019/07/21 14:39:32 jca Exp $ */
+/* $OpenBSD: lock.c,v 1.45 2019/07/21 22:44:44 jca Exp $ */
/* $NetBSD: lock.c,v 1.8 1996/05/07 18:32:31 jtc Exp $ */
/*
@@ -97,7 +97,7 @@ main(int argc, char *argv[])
backoff = login_getcapnum(lc, "login-backoff", 3, 3);
}
- while ((ch = getopt(argc, argv, "a:pt:")) != -1) {
+ while ((ch = getopt(argc, argv, "a:npt:")) != -1) {
switch (ch) {
case 'a':
if (lc) {
@@ -118,6 +118,9 @@ main(int argc, char *argv[])
case 'p':
usemine = 1;
break;
+ case 'n':
+ /* backward compatibility, -n meant "lock forever" */
+ break;
default:
usage();
}