From 42300faaa90e69caf6c728a1ed0cf1abe67f6e3b Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Wed, 27 Jul 2011 13:22:39 +0100 Subject: 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. --- tests/cp/same-file | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') 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) -- cgit v1.2.3-54-g00ecf