Revert rev. 1.16, as per PR kern/17411.
While a hard link to a symbolic link is not ruled out by POSIX-2001, the ln(1) utility (sans -s) is to perform equivalent to the link(2) function on its operands, which includes the resolution of symbolic links in source_file arguments.
This commit is contained in:
parent
0917926472
commit
ade418e6fd
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: ln.c,v 1.19 2001/09/16 22:14:40 wiz Exp $ */
|
/* $NetBSD: ln.c,v 1.20 2002/10/30 22:52:10 kleink Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1987, 1993, 1994
|
* Copyright (c) 1987, 1993, 1994
|
||||||
|
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 1993, 1994\n\
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)ln.c 8.2 (Berkeley) 3/31/94";
|
static char sccsid[] = "@(#)ln.c 8.2 (Berkeley) 3/31/94";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: ln.c,v 1.19 2001/09/16 22:14:40 wiz Exp $");
|
__RCSID("$NetBSD: ln.c,v 1.20 2002/10/30 22:52:10 kleink Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ linkit(char *target, char *source, int isdir)
|
||||||
|
|
||||||
if (!sflag) {
|
if (!sflag) {
|
||||||
/* If target doesn't exist, quit now. */
|
/* If target doesn't exist, quit now. */
|
||||||
if (lstat(target, &sb)) {
|
if (stat(target, &sb)) {
|
||||||
warn("%s", target);
|
warn("%s", target);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue