| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For Linux-style accounting, we really only need to handle a single page
of wasted space due to rounding. Subtracting two pages for extra
headroom was reasonable on systems with 4K pages, but overkill on
systems like ppc64le with 64K pages. Worse yet was the fact that Alpine
Linux only gives us 128K for arguments.
Instead, only subtract a single page, plus the POSIX-recommended 2048
bytes.
Credit to Mike Sullivan for the initial patch and testing on Alpine
ppc64le.
Fixes:
http://build.alpinelinux.org/buildlogs/build-edge-ppc64le/testing/bfs/bfs-1.2.2-r0.log
Co-authored-by: Mike Sullivan <mksully22@gmail.com>
|
|
|
|
|
|
|
| |
This avoids the potential for "broken pipe" errors observed on some
systems, e.g.
http://build.alpinelinux.org/buildlogs/build-edge-s390x/testing/bfs/bfs-1.2.2-r0.log
|
| |
|
|
|
|
|
|
|
|
| |
In particular, this caused -fprint to break on Hurd since AT_EMPTY_PATH
is defined and works for some syscalls but not fstatat().
Should fix:
https://buildd.debian.org/status/fetch.php?pkg=bfs&arch=hurd-i386&ver=1.2.2-1&stamp=1529920401&raw=0
|
|
|
|
|
|
|
|
|
|
| |
Turns out that ia64 and sh4 define all the structures and constants, but
don't actually support the statx() system call itself. So instead of
testing for the constants, just test for the syscall number directly.
Should fix:
https://buildd.debian.org/status/fetch.php?pkg=bfs&arch=ia64&ver=1.2.2-1&stamp=1529917943&raw=0
https://buildd.debian.org/status/fetch.php?pkg=bfs&arch=sh4&ver=1.2.2-1&stamp=1529917893&raw=0
|
| |
|
| |
|
|
|
|
|
| |
Whether bfs can return children of a directory without search permission
depends on whether d_type is filled in, which can't be guaranteed.
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes: 2a45ad01e211d0b36056c21d5211be46195b273d
|
|
|
|
|
|
|
|
|
| |
When adding support for -perm +7777, I introduced an unconditional break
that should have been conditional. The bug was observable with
$ ./tests.sh --verbose --bfs="valgrind $PWD/bfs" test_perm_leading_plus_symbolic
Fixes: 7f8bacca4c2b1d35bb65ddf8cbf70fadf1adf66e
|
|
|
|
| |
The performance is within 1% with much simpler code.
|
| |
|
|
|
|
|
|
|
| |
BusyBox rm, for example, doesn't handle long paths properly, so give it
some help.
C.f. http://lists.busybox.net/pipermail/busybox/2018-March/086302.html
|
|
|
|
|
| |
This frees up an extra FD for some diff implementations like openbox
that need it when ulimit -n is low.
|
| |
|
|
|
|
| |
Useful for debugging testsuite failures.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Also, don't pass the address of errno itself to write(), since write()
is allowed to modify it.
|
|
|
|
|
|
| |
The designated initializer causes everything not mentioned to be zeroed,
a waste of time that shows up on profiles. It also has the potential to
hide uninitialized-use bugs.
|
|
|
|
|
|
| |
GCC doesn't (yet) produce very fast code for strcmp() against constant
strings (see https://gcc.gnu.org/PR78809), so hand-coding the comparison
manually helps significantly.
|
|
|
|
|
|
|
|
|
|
| |
There were two problems:
- bubble_down() would always bubble the entry all the way down the heap,
instead of stopping at the appropriate place
- remove() may need to bubble the replacement entry *up* the heap, if it
came from a different subtree
|
| |
|
|
|
|
|
| |
%w and %W were chosen to match the format specifiers for file birth
times from stat(1)
|
|
|
|
|
| |
This lets bfs transparently support the new statx() system call on
Linux, giving it access to file birth times.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #19
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
From looking at the Linux exec() implementation, it seems a big part of
the reason we needed extra headroom was that the arguments/environment
are copied page-by-page, so even a small accounting difference could
result in an error of an entire page size. Grow the headroom to two
entire pages to account for this.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I ran into "argument list too long" errors with a
bfs -type f -exec grep pattern '{}' +
command, despite the current accounting being pretty careful. Some
experimentation showed that an additional 2048 bytes of headroom is
always safe.
While we're at it, explicitly account for the terminating NULL pointers
in argv and environ.
|
| |
|
| |
|
|
|
|
| |
Fixes #22
|
|
|
|
| |
Otherwise we miss write errors that occur when flushing the cache.
|