Module Name: src Committed By: kre Date: Sat Apr 22 12:22:31 UTC 2017
Modified Files: src/bin/ln: ln.c Log Message: When called as "link" (not currently installed that way) always simply do a link(2) sys call, never use the internal linkit() routine, which allows for a destination directory and installs the link inside (and more.) This makes ln's "link" variant comply with its (currently commented out) section if its manual page, and also makes it identical to /usr/sbin/link. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/bin/ln/ln.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/bin/ln/ln.c diff -u src/bin/ln/ln.c:1.38 src/bin/ln/ln.c:1.39 --- src/bin/ln/ln.c:1.38 Fri Apr 21 14:46:31 2017 +++ src/bin/ln/ln.c Sat Apr 22 12:22:31 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ln.c,v 1.38 2017/04/21 14:46:31 szptvlfn Exp $ */ +/* $NetBSD: ln.c,v 1.39 2017/04/22 12:22:31 kre Exp $ */ /*- * Copyright (c) 1987, 1993, 1994 @@ -44,7 +44,7 @@ static char sccsid[] = "@(#)ln.c 8.2 (Be #ifdef __FBSDID __FBSDID("$FreeBSD: head/bin/ln/ln.c 251261 2013-06-02 17:55:00Z eadler $"); #endif -__RCSID("$NetBSD: ln.c,v 1.38 2017/04/21 14:46:31 szptvlfn Exp $"); +__RCSID("$NetBSD: ln.c,v 1.39 2017/04/22 12:22:31 kre Exp $"); #include <sys/param.h> #include <sys/stat.h> @@ -96,7 +96,9 @@ main(int argc, char *argv[]) argv += optind; if (argc != 2) usage(); - exit(linkit(argv[0], argv[1], 0)); + if (link(argv[0], argv[1]) == -1) + err(EXIT_FAILURE, NULL); + exit(EXIT_SUCCESS); } while ((ch = getopt(argc, argv, "FLPfhinsvw")) != -1)