[libcxx-commits] [PATCH] D60880: [libc++] Use COPYFILE_CLONE from the macOS copyfile(3) API to support APFS clones

Adrian Prantl via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 18 11:25:15 PDT 2019


aprantl added a comment.

I assume the availability check isn't necessary because libcxx won't back-deploy to 10.11?



================
Comment at: libcxx/src/filesystem/operations.cpp:681
   CopyFileState cfs;
-  if (fcopyfile(read_fd.fd, write_fd.fd, cfs.state, COPYFILE_DATA) < 0) {
+  if (fcopyfile(read_fd.fd, write_fd.fd, cfs.state, COPYFILE_CLONE) < 0) {
     ec = capture_errno();
----------------
It looks like you may be able to pass `nullptr` as the third parameter if you don't need the state afterwards.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60880/new/

https://reviews.llvm.org/D60880





More information about the libcxx-commits mailing list