summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authordds <dds@FreeBSD.org>2007-12-16 14:14:31 +0000
committerdds <dds@FreeBSD.org>2007-12-16 14:14:31 +0000
commit004bc4d2039f33bb0294d3435a971832ed974a66 (patch)
tree09773cfcea09cc4f020ade28eb80f2f29a729fa4 /sbin
parent51e9c8f1ae96b6aa8e47608145c854ec1efe3c7f (diff)
downloadFreeBSD-src-004bc4d2039f33bb0294d3435a971832ed974a66.zip
FreeBSD-src-004bc4d2039f33bb0294d3435a971832ed974a66.tar.gz
When moving a directory across devices to a place where a directory
with the same name exists, delete that directory first, before performing the copy. This ensures that mv(1) across devices follows the semantics of rename(2), as required by POSIX. This change could introduce the potential of data loss, even if the copy fails, violating the atomicity properties of rename(2). This is (mostly) mitigated by first renaming the destination and obliterating it only after a succesfull copy. The above logic also led to the introduction of code that will cleanup the results of a partial copy, if a cross-device copy fails. PR: bin/118367 MFC after: 1 month
Diffstat (limited to 'sbin')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud