Re: [PATCH 5/6] t7063: use POSIX find(1) syntax
- From
Jeff King <peff@peff.net>
- Date
- Mar 19, 2020, 16:12 UTC
- Message-ID
- <20200319161200.GF3513282@coredump.intra.peff.net>
- In-Reply-To
- <215801b02aceeed1e0f6313679c567a914ad5dd8.1584625896.git.congdanhqx@gmail.com>
On Thu, Mar 19, 2020 at 09:00:06PM +0700, Đoàn Trần Công Danh wrote:
Show 8 quoted lines
> Since commit 6b7728db81, (t7063: work around FreeBSD's lazy mtime
> update feature, 2016-08-03), we started to use ls as a trick to update
> directory's mtime.
>
> However, `-ls` flag isn't required by POSIX's find(1), and
> busybox(1) doesn't implement it.
>
> Use an equivalence `-exec ls -dils {} +` instead.Makes sense. I wonder if we need all of "-dils", but it's not clear to me which syscalls actually trigger the FreeBSD lazy-update behavior. I guess probably it's stat()ing the directory, so "ls -ld" would be sufficient (and that's implied by the examples in 6b7728db81).
But I doubt the extra options would create a portability problem, so I think it's fine either way.
-Peff