diff options
author | Pádraig Brady <P@draigBrady.com> | 2011-07-27 13:22:39 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2011-07-27 13:32:32 +0100 |
commit | 42300faaa90e69caf6c728a1ed0cf1abe67f6e3b (patch) | |
tree | cd08a50181c1e0de3c89cfc9564dbb3501cc54d3 /tests/cp/same-file | |
parent | 2aea1828a1aab158f68cccf3eac408203889021e (diff) | |
download | coreutils-42300faaa90e69caf6c728a1ed0cf1abe67f6e3b.tar.xz |
maint: copy: refactor hard link creation
* src/copy.c (create_hard_link): A new function refactored
from existing code.
(copy_internal): Call the new function from all 3 locations
that create hard links.
* tests/cp/same-file: Amend to match the adjusted diagnostic.
Diffstat (limited to 'tests/cp/same-file')
-rwxr-xr-x | tests/cp/same-file | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/cp/same-file b/tests/cp/same-file index da4fce3d0..0edd68ea7 100755 --- a/tests/cp/same-file +++ b/tests/cp/same-file @@ -137,7 +137,7 @@ cat <<\EOF | sed "$remove_these_sed" > expected 0 -bd (foo symlink symlink.~1~ -> foo) 0 -bf (foo symlink symlink.~1~ -> foo) 0 -bdf (foo symlink symlink.~1~ -> foo) -1 -l [cp: cannot create link `symlink'] (foo symlink -> foo) +1 -l [cp: cannot create hard link `symlink' to `foo'] (foo symlink -> foo) 0 -dl (foo symlink -> foo) 0 -fl (foo symlink) 0 -dfl (foo symlink) @@ -188,7 +188,7 @@ cat <<\EOF | sed "$remove_these_sed" > expected 0 -bd (foo sl1 -> foo sl2 -> foo sl2.~1~ -> foo) 0 -bf (foo sl1 -> foo sl2 sl2.~1~ -> foo) 0 -bdf (foo sl1 -> foo sl2 -> foo sl2.~1~ -> foo) -1 -l [cp: cannot create link `sl2'] (foo sl1 -> foo sl2 -> foo) +1 -l [cp: cannot create hard link `sl2' to `sl1'] (foo sl1 -> foo sl2 -> foo) 0 -fl (foo sl1 -> foo sl2 -> foo) 0 -bl (foo sl1 -> foo sl2 -> foo sl2.~1~ -> foo) 0 -bfl (foo sl1 -> foo sl2 -> foo sl2.~1~ -> foo) |