bin/138245: find -newerXB doesn't work

David E. Cross crossd at cs.rpi.edu
Thu Aug 27 20:20:02 UTC 2009


>Number:         138245
>Category:       bin
>Synopsis:       find -newerXB doesn't work
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 27 20:20:01 UTC 2009
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:


More information about the freebsd-bugs mailing list