summaryrefslogtreecommitdiff
path: root/usr.bin/find
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-06-17 05:53:45 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-06-17 05:53:45 +0000
commitc8e10b82383ece01b2fe949913a2d36115c19516 (patch)
tree64088d9f075ef2410926e3022be5120a78f33cfd /usr.bin/find
parentee1d75dcd05013dcca03ca1dbd1f7e028046f6f9 (diff)
Back out last change. Allowing no path to mean "." causes problems
with getopts vs. predicates.
Diffstat (limited to 'usr.bin/find')
-rw-r--r--usr.bin/find/find.15
-rw-r--r--usr.bin/find/main.c8
2 files changed, 6 insertions, 7 deletions
diff --git a/usr.bin/find/find.1 b/usr.bin/find/find.1
index 6f470a46e8b..145911c1fe0 100644
--- a/usr.bin/find/find.1
+++ b/usr.bin/find/find.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: find.1,v 1.11 1997/06/17 05:35:44 millert Exp $
+.\" $OpenBSD: find.1,v 1.12 1997/06/17 05:53:44 millert Exp $
.\" Copyright (c) 1990, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
@@ -54,8 +54,7 @@ recursively descends the directory tree for each
listed, evaluating an
.Ar expression
(composed of the ``primaries'' and ``operands'' listed below) in terms
-of each file in the tree. If no files are specified, the current
-directory is used.
+of each file in the tree.
.Pp
The options are as follows:
.Pp
diff --git a/usr.bin/find/main.c b/usr.bin/find/main.c
index 0bcd42a4e6c..fc12f0bccf0 100644
--- a/usr.bin/find/main.c
+++ b/usr.bin/find/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.6 1997/06/17 05:35:44 millert Exp $ */
+/* $OpenBSD: main.c,v 1.7 1997/06/17 05:53:44 millert Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -35,7 +35,7 @@
#ifndef lint
/*static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93";*/
-static char rcsid[] = "$OpenBSD: main.c,v 1.6 1997/06/17 05:35:44 millert Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.7 1997/06/17 05:53:44 millert Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -73,7 +73,7 @@ main(argc, argv)
(void)time(&now); /* initialize the time-of-day */
- p = paths = (char **) emalloc(sizeof(char *) * (argc > 1 ? argc : 2));
+ p = paths = (char **) emalloc(sizeof(char *) * argc);
sigaction(SIGINFO, &sa, NULL);
@@ -120,7 +120,7 @@ main(argc, argv)
}
if (p == paths)
- *p++ = "."; /* use cwd if no dir specified */
+ usage();
*p = NULL;
if (!(paths = realloc(paths, sizeof(char *) * (p - paths + 1))))