Bug 18941

Summary: Adding -{min,max}depth options to find(1)
Product: Base System Reporter: Ben Smithurst <ben>
Component: binAssignee: Ollivier Robert <roberto>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.0-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff
none
find.diff none

Description Ben Smithurst 2000-06-01 13:50:06 UTC
This patch adds the -mindepth and -maxdepth options to find(1), which
behave as in GNU find (and of course as described in the manual page
diff included).  I think these options would be useful for some people.

Some missing $FreeBSD$ tags are also added.

I posted this patch on -hackers a month or two ago; there was only
response from kris (something like "good idea, but I haven't reviewed
the patch") so I thought I'd send-pr it.
Comment 1 Bill Fumerola 2000-06-01 15:47:20 UTC
On Thu, Jun 01, 2000 at 01:25:54PM +0100, Ben Smithurst wrote:
> 

> @@ -35,7 +35,9 @@
>   */
>  
>  #ifndef lint
> -static char sccsid[] = "@(#)find.c	8.5 (Berkeley) 8/5/94";
> +static const char sccsid[] = "@(#)find.c	8.5 (Berkeley) 8/5/94";
> +static const char rcsid[] =
> +	"$FreeBSD$";
>  #endif /* not lint */

all of these deltas like this should look something like:

#if 0
static char sccsid[] = "blah..";
#else
static const char rcsid[] = 
  "$FreeBSD$";
#endif

or something similar.
</minibde>

-- 
Bill Fumerola - Network Architect / Computer Horizons Corp - CVM
e-mail: billf@chc-chimes.com / billf@FreeBSD.org
Comment 2 Ben Smithurst 2000-06-01 17:33:03 UTC
Bill Fumerola wrote:

> all of these deltas like this should look something like:
> 
> #if 0
> static char sccsid[] = "blah..";
> #else
> static const char rcsid[] = 
>   "$FreeBSD$";
> #endif

ok.  Should the #ifndef lint around it all stay?

-- 
Ben Smithurst / ben@scientia.demon.co.uk / PGP: 0x99392F7D
Comment 3 Bill Fumerola 2000-06-01 20:12:42 UTC
On Thu, Jun 01, 2000 at 05:33:03PM +0100, Ben Smithurst wrote:

> > #if 0
> > static char sccsid[] = "blah..";
> > #else
> > static const char rcsid[] = 
> >   "$FreeBSD$";
> > #endif
> 
> ok.  Should the #ifndef lint around it all stay?

yes

-- 
Bill Fumerola - Network Architect / Computer Horizons Corp - CVM
e-mail: billf@chc-chimes.com / billf@FreeBSD.org
Comment 4 Ben Smithurst 2000-06-02 21:53:04 UTC
Bill Fumerola wrote:

> On Thu, Jun 01, 2000 at 05:33:03PM +0100, Ben Smithurst wrote:
> 
>> ok.  Should the #ifndef lint around it all stay?
> 
> yes

ok, here's an updated diff.

-- 
Ben Smithurst / ben@scientia.demon.co.uk / PGP: 0x99392F7D
Comment 5 nrahlstr freebsd_committer freebsd_triage 2000-06-06 05:56:26 UTC
Responsible Changed
From-To: freebsd-bugs->roberto

Ollivier has kindly agreed to look over find(1) related PR's.
Comment 6 Ollivier Robert freebsd_committer freebsd_triage 2000-06-12 12:12:48 UTC
State Changed
From-To: open->closed

Patch applied after tabs unmangling. Thanks!