From nobody@FreeBSD.org  Thu Aug 27 20:10:44 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0178A106568E
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 27 Aug 2009 20:10:44 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id E50428FC2F
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 27 Aug 2009 20:10:43 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n7RKAhWO037131
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 27 Aug 2009 20:10:43 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n7RKAhnr037130;
	Thu, 27 Aug 2009 20:10:43 GMT
	(envelope-from nobody)
Message-Id: <200908272010.n7RKAhnr037130@www.freebsd.org>
Date: Thu, 27 Aug 2009 20:10:43 GMT
From: "David E. Cross" <crossd@cs.rpi.edu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: find -newerXB doesn't work
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         138245
>Category:       bin
>Synopsis:       [patch] find(1): find -newerXB doesn't work
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gavin
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 27 20:20:01 UTC 2009
>Closed-Date:    Wed Mar 17 20:19:06 UTC 2010
>Last-Modified:  Wed Mar 17 20:20:04 UTC 2010
>Originator:     David E. Cross
>Release:        8.0-BETA2
>Organization:
>Environment:
FreeBSD XXXX 8.0-BETA2 FreeBSD 8.0-BETA2 #0: Mon Aug 17 13:31:29 EDT 2009     root@XXXX:/usr/obj/usr/src/sys/HPDAVID  amd64
>Description:
find -newerXB is the same as find -newerXm because the if line in c_newer in function.c (in find) doesn't have a check for F_TIME2_B and just falls thtough to the default.



>How-To-Repeat:
Create a file, try to search newer then its birth-time... touch the file, try again.. see the different results.

>Fix:
*** /usr/src/usr.bin/find/function.c.orig
--- /usr/src/usr.bin/find/function.c
***************                                                                 
*** 1155,1160 ****                                                              
--- 1122,1129 ----                                                              
                        new->t_data = sb.st_ctime;                              
                else if (option->flags & F_TIME2_A)                             
                        new->t_data = sb.st_atime;                              
+               else if (option->flags & F_TIME2_B)                             
+                       new->t_data = sb.st_birthtime;                          
                else                                                            
                        new->t_data = sb.st_mtime;                              
        }                                                                       

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: gavin 
State-Changed-When: Sun Feb 14 11:54:12 UTC 2010 
State-Changed-Why:  
Fixed in head (r203865) 


Responsible-Changed-From-To: freebsd-bugs->gavin 
Responsible-Changed-By: gavin 
Responsible-Changed-When: Sun Feb 14 11:54:12 UTC 2010 
Responsible-Changed-Why:  
Mine 

http://www.freebsd.org/cgi/query-pr.cgi?pr=138245 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/138245: commit references a PR
Date: Sun, 14 Feb 2010 12:08:55 +0000 (UTC)

 Author: gavin
 Date: Sun Feb 14 12:08:44 2010
 New Revision: 203865
 URL: http://svn.freebsd.org/changeset/base/203865
 
 Log:
   The -newerXB option was being interpreted the same as the -newerXm option
   as a check for F_TIME2_B was missing.  Fix this.
   
   PR:		bin/138245
   Submitted by:	"David E. Cross"  <crossd cs.rpi.edu>
   MFC after:	1 month
 
 Modified:
   head/usr.bin/find/function.c
 
 Modified: head/usr.bin/find/function.c
 ==============================================================================
 --- head/usr.bin/find/function.c	Sun Feb 14 12:04:25 2010	(r203864)
 +++ head/usr.bin/find/function.c	Sun Feb 14 12:08:44 2010	(r203865)
 @@ -1164,6 +1164,8 @@ c_newer(OPTION *option, char ***argvp)
  			new->t_data = sb.st_ctime;
  		else if (option->flags & F_TIME2_A)
  			new->t_data = sb.st_atime;
 +		else if (option->flags & F_TIME2_B)
 +			new->t_data = sb.st_birthtime;
  		else
  			new->t_data = sb.st_mtime;
  	}
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: gavin 
State-Changed-When: Wed Mar 17 20:18:41 UTC 2010 
State-Changed-Why:  
Fixed in head, stable/8 and stable/7.  Thanks for your submission! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=138245 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/138245: commit references a PR
Date: Wed, 17 Mar 2010 20:16:46 +0000 (UTC)

 Author: gavin
 Date: Wed Mar 17 20:16:28 2010
 New Revision: 205256
 URL: http://svn.freebsd.org/changeset/base/205256
 
 Log:
   Merge r203865 from head:
   
     The -newerXB option was being interpreted the same as the -newerXm option
     as a check for F_TIME2_B was missing.  Fix this.
   
   PR:		bin/138245
   Submitted by:	"David E. Cross"  <crossd cs.rpi.edu>
 
 Modified:
   stable/8/usr.bin/find/function.c
 Directory Properties:
   stable/8/usr.bin/find/   (props changed)
 
 Modified: stable/8/usr.bin/find/function.c
 ==============================================================================
 --- stable/8/usr.bin/find/function.c	Wed Mar 17 20:13:09 2010	(r205255)
 +++ stable/8/usr.bin/find/function.c	Wed Mar 17 20:16:28 2010	(r205256)
 @@ -1165,6 +1165,8 @@ c_newer(OPTION *option, char ***argvp)
  			new->t_data = sb.st_ctime;
  		else if (option->flags & F_TIME2_A)
  			new->t_data = sb.st_atime;
 +		else if (option->flags & F_TIME2_B)
 +			new->t_data = sb.st_birthtime;
  		else
  			new->t_data = sb.st_mtime;
  	}
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/138245: commit references a PR
Date: Wed, 17 Mar 2010 20:17:33 +0000 (UTC)

 Author: gavin
 Date: Wed Mar 17 20:17:25 2010
 New Revision: 205257
 URL: http://svn.freebsd.org/changeset/base/205257
 
 Log:
   Merge r203865 from head:
   
     The -newerXB option was being interpreted the same as the -newerXm option
     as a check for F_TIME2_B was missing.  Fix this.
   
   PR:		bin/138245
   Submitted by:	"David E. Cross"  <crossd cs.rpi.edu>
 
 Modified:
   stable/7/usr.bin/find/function.c
 Directory Properties:
   stable/7/usr.bin/find/   (props changed)
 
 Modified: stable/7/usr.bin/find/function.c
 ==============================================================================
 --- stable/7/usr.bin/find/function.c	Wed Mar 17 20:16:28 2010	(r205256)
 +++ stable/7/usr.bin/find/function.c	Wed Mar 17 20:17:25 2010	(r205257)
 @@ -1122,6 +1122,8 @@ c_newer(OPTION *option, char ***argvp)
  			new->t_data = sb.st_ctime;
  		else if (option->flags & F_TIME2_A)
  			new->t_data = sb.st_atime;
 +		else if (option->flags & F_TIME2_B)
 +			new->t_data = sb.st_birthtime;
  		else
  			new->t_data = sb.st_mtime;
  	}
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
