freebsd-src/bin
Dag-Erling Smørgrav d6d22a4530 cp: Add tests involving sparse files.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D38290

(cherry picked from commit 822fa7ae1e)

cp: Simplify the common case.

* The allocated buffer is only used in the fallback case, so move it
  there.  The argument for passing it in from the caller was that if
  malloc(3) were to fail, we'd want it to fail before we started
  copying anything, but firstly, it was already not in the right place
  to ensure that, and secondly, malloc(3) never fails (except in very
  contrived circumstances, such as an unreasonable RLIMIT_AS or
  RLIMIT_DATA).

* Remove the mmap(2) option.  It is almost never beneficial,
  especially when the alternative is copy_file_range(2), and it adds
  needless complexity and indentation.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	rmacklem, mav
Differential Revision:	https://reviews.freebsd.org/D38291

(cherry picked from commit 6c85042afc)

cp: Minor code cleanup.

* Fix includes in utils.c, cf. style(9).
* Fix type mismatch: readlink(2) returns ssize_t, not int.
* It is not necessary to set errno to 0 as fts_read(3) already does it.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D38369

(cherry picked from commit cb96a0ef00)

cp: Adjust the sparse file tests.

* The sparsity check was ineffective: it compared the apparent size in bytes to the actual size in blocks.  Instead, write a tool that reliably detects sparseness.
* Some of the seq commands were missing an argument.
* Based on empirical evidence, 1 MB holes are not necessarily large enough to be preserved by the underlying filesystem.  Increase the hole size to 16 MB.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	cracauer
Differential Revision:	https://reviews.freebsd.org/D38414

(cherry picked from commit 8b418c83d1)
2023-02-09 21:32:56 +01:00
..
cat
chflags
chio
chmod
cp cp: Add tests involving sparse files. 2023-02-09 21:32:56 +01:00
csh
date date: attempt to more accurately describe year limitations with -v 2022-09-18 01:26:39 -05:00
dd
df df: Return non-zero status on write failure. 2023-02-09 21:32:56 +01:00
domainname
echo
ed
expr
freebsd-version
getfacl
hostname
kenv
kill
ln
ls ls(1): add a -v flag to sort naturally 2022-12-24 07:47:21 +01:00
mkdir
mv
pax pax: remove 4.4BSD compatibility 2022-11-02 10:39:18 +01:00
pkill
ps
pwait
pwd
realpath
rm
rmail
rmdir
setfacl
sh sh: Fix mismatch in array bounds for vforkexecshell(). 2022-11-11 10:18:53 -08:00
sleep
stty stty(1): provide details about interaction with job control 2022-10-09 05:23:04 +03:00
sync
test
tests
timeout timeout: Move from /usr/bin to /bin 2023-02-07 18:37:53 +01:00
uuidgen bin/uuidgen: add support for v4 uuids 2023-01-10 08:48:55 +01:00
Makefile timeout: Move from /usr/bin to /bin 2023-02-07 18:37:53 +01:00
Makefile.inc