Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/ln Revert rev. 1.16, as per PR kern/17411.



details:   https://anonhg.NetBSD.org/src/rev/59f9964e5194
branches:  trunk
changeset: 538813:59f9964e5194
user:      kleink <kleink%NetBSD.org@localhost>
date:      Wed Oct 30 22:52:10 2002 +0000

description:
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.

diffstat:

 bin/ln/ln.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 2020a24be0ce -r 59f9964e5194 bin/ln/ln.c
--- a/bin/ln/ln.c       Wed Oct 30 22:36:46 2002 +0000
+++ b/bin/ln/ln.c       Wed Oct 30 22:52:10 2002 +0000
@@ -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
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)ln.c       8.2 (Berkeley) 3/31/94";
 #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 /* not lint */
 
@@ -134,7 +134,7 @@
 
        if (!sflag) {
                /* If target doesn't exist, quit now. */
-               if (lstat(target, &sb)) {
+               if (stat(target, &sb)) {
                        warn("%s", target);
                        return (1);
                }



Home | Main Index | Thread Index | Old Index