]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r319856,r320172,r320173:
authorngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 17 Jul 2017 21:13:43 +0000 (21:13 +0000)
committerngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 17 Jul 2017 21:13:43 +0000 (21:13 +0000)
commit0ba93322514d546643b73313cbdb736a0ad1ea70
tree730abc08bb4668baa935e13a2a3b7722be9002da
parenteeca13c5483f01a995ddde4d3a557a683bb9203f
MFC r319856,r320172,r320173:

r319856:

Add a testcase for `ln -sF`

The testcase fails today, so mark it with atf_expect_fail: in
particular, the target (B) isn't being unlinked and the documentation
doesn't suggest special handling for directories. Thus, there's either
a doc or an implementation bug in ln(1) that needs to be resolved.

MFC with: r319714, r319854, r319855
PR: 219943

r320172:

ln(1): fix -F behavior

When '-F' option is used, the target directory needs to be unlinked.
Currently, the modified target ("target/source") is being unlinked, and
since it doesn't yet exist, the original target isn't removed.
This is fixed by skipping the block where target is modified to
"target/source" when '-F' option is set.
Hence, a symbolic link (with the same name as of the original target) to
the source_file is produced.

Update the test for ln(1) to reflect fix for option '-F'

PR: 219943

r320173:

Don't expect :sF_flag to fail anymore

While here, also add a check to verify that the link target
is updated in the testcase

MFC with: r320172
PR: 219943

git-svn-id: svn://svn.freebsd.org/base/stable/10@321094 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
bin/ln/ln.c
bin/ln/tests/ln_test.sh