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)
Sat, Feb 22, 2:26 PM
Unknown Object (File)
Sat, Feb 22, 1:55 PM
Unknown Object (File)
Sat, Feb 22, 1:53 PM
Unknown Object (File)
Jan 29 2025, 4:31 PM
Unknown Object (File)
Jan 28 2025, 6:13 PM
Unknown Object (File)
Jan 27 2025, 5:03 PM
Unknown Object (File)
Jan 27 2025, 7:37 AM
Unknown Object (File)
Jan 26 2025, 6:02 PM

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