| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
|
| |
The code was testing for BSD, since all the normal BSDs have it. But
until recently, <sys/param.h> wasn't included, so BSD was undefined even
on platforms that define it. Now that it is defined appropriately,
exclude macOS specifically.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
POSIX says
> The unit for the st_blocks member of the stat structure is not defined
> within POSIX.1‐2008.
and recommends using DEV_BSIZE from <sys/param.h> if available.
Also, for -printf '%S', print 1 instead of NaN for empty files with no
blocks.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Also shorten eval_bfs_stat() to eval_stat(). Looks like this was
leftover from an incomplete conversion a while ago.
|
|
|
|
|
| |
Same bug as https://savannah.gnu.org/bugs/?46305. Please don't ever do
this though.
|
|
|
|
|
|
|
|
|
| |
glibc 2.28 will ship with a wrapper for the statx() system call.
Currently the build is broken against it, because sys/stat.h suddenly
declares all the same types that linux/stat.h does. Fix it by taking
the sys/stat.h ones if they exist.
Fixes #35
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|