diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2006-05-28 05:29:55 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2006-05-28 05:29:55 +0000 |
commit | 68fe893a9f1ead265b6739f54a47fbdc839ee159 (patch) | |
tree | 87f6c0d0056eac91959a9448fab96987eb13b884 /usr.bin | |
parent | bd64b800ae4fc10c918bcd7b9ef1a09d407a0301 (diff) |
Re-add '-' getopt flag, since getopt can actually handle it.
Requested by deraadt@.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/env/env.1 | 6 | ||||
-rw-r--r-- | usr.bin/env/env.c | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/usr.bin/env/env.1 b/usr.bin/env/env.1 index 0c2a0d50be7..207414302b8 100644 --- a/usr.bin/env/env.1 +++ b/usr.bin/env/env.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: env.1,v 1.12 2006/05/28 04:21:13 ray Exp $ +.\" $OpenBSD: env.1,v 1.13 2006/05/28 05:29:54 ray Exp $ .\" Copyright (c) 1980, 1990 The Regents of the University of California. .\" All rights reserved. .\" @@ -107,6 +107,10 @@ could not be found. .Xr execvp 3 , .Xr environ 7 .Sh STANDARDS +The historic +.Fl +option has been deprecated but is still supported in this implementation. +.Pp The .Nm utility conforms to diff --git a/usr.bin/env/env.c b/usr.bin/env/env.c index db5d70f7f6c..8240bf28928 100644 --- a/usr.bin/env/env.c +++ b/usr.bin/env/env.c @@ -1,4 +1,4 @@ -/* $OpenBSD: env.c,v 1.11 2006/05/28 04:21:13 ray Exp $ */ +/* $OpenBSD: env.c,v 1.12 2006/05/28 05:29:54 ray Exp $ */ /* * Copyright (c) 1988, 1993, 1994 @@ -37,7 +37,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "@(#)env.c 8.3 (Berkeley) 4/2/94";*/ -static char rcsid[] = "$OpenBSD: env.c,v 1.11 2006/05/28 04:21:13 ray Exp $"; +static char rcsid[] = "$OpenBSD: env.c,v 1.12 2006/05/28 05:29:54 ray Exp $"; #endif /* not lint */ #include <err.h> @@ -60,8 +60,9 @@ main(int argc, char *argv[]) setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "i")) != -1) + while ((ch = getopt(argc, argv, "i-")) != -1) switch(ch) { + case '-': /* obsolete */ case 'i': if ((environ = calloc(1, sizeof(char *))) == NULL) err(126, "calloc"); |