svn commit: r366697 - head/usr.bin/xinstall

Brooks Davis brooks at freebsd.org
Wed Oct 14 19:01:06 UTC 2020


On Wed, Oct 14, 2020 at 02:40:42PM +0100, Jessica Clarke wrote:
> On 14 Oct 2020, at 14:28, Mateusz Guzik <mjguzik at gmail.com> wrote:
> > 
> > This should use copy_file_range (also available on Linux).
> 
> I assume this is a bootstrap tool and hence the system OS and version
> is relevant. macOS does not have copy_file_range, and FreeBSD only has
> it in -CURRENT so that would break building on 11.x and 12.x. So any
> use would need to be guarded by preprocessor checks (and there are
> still actively-supported Linux distributions out there that are based
> on too-old versions of the kernel and/or glibc to include it).
> 
> (FYI macOS's equivalent is copyfile(3)... maybe one day it will adopt
> the copy_file_range(2) interface too)

copyfile has different semantics, not the least of which is supporting
file clones.  Once ZFS grows file clone support it would be nice if install
supported them as well.  I'd love to only pay the inode cost for
installed files when I'm just building a disk image.

-- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20201014/131a3524/attachment.sig>


More information about the svn-src-head mailing list