Page MenuHomeFreeBSD

cp: Refactor the core logic.
ClosedPublic

Authored by des on Dec 13 2023, 11:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 7, 12:05 AM
Unknown Object (File)
Aug 30 2025, 5:10 PM
Unknown Object (File)
Aug 21 2025, 4:43 PM
Unknown Object (File)
Aug 2 2025, 6:43 PM
Unknown Object (File)
Aug 2 2025, 4:33 AM
Unknown Object (File)
Jul 27 2025, 5:22 AM
Unknown Object (File)
Jul 27 2025, 2:11 AM
Unknown Object (File)
Jul 10 2025, 11:51 AM

Details

Summary

Rewrite copy_file() so the lflag and sflag are handled as early as possible instead of constantly checking that they're not set and then handling them at the end. This also opens the door to changing the failure logic at some future point (for instance, we might decide to fall back to copying if errno indicates that the file system does not support links).

MFC after: 1 week
Sponsored by: Klara, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable