Deleted Added
full compact
ln.c (90110) ln.c (91084)
1/*
2 * Copyright (c) 1987, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 28 unchanged lines hidden (view full) ---

37 The Regents of the University of California. All rights reserved.\n";
38#endif /* not lint */
39
40#ifndef lint
41#if 0
42static char sccsid[] = "@(#)ln.c 8.2 (Berkeley) 3/31/94";
43#endif
44static const char rcsid[] =
1/*
2 * Copyright (c) 1987, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 28 unchanged lines hidden (view full) ---

37 The Regents of the University of California. All rights reserved.\n";
38#endif /* not lint */
39
40#ifndef lint
41#if 0
42static char sccsid[] = "@(#)ln.c 8.2 (Berkeley) 3/31/94";
43#endif
44static const char rcsid[] =
45 "$FreeBSD: head/bin/ln/ln.c 90110 2002-02-02 06:48:10Z imp $";
45 "$FreeBSD: head/bin/ln/ln.c 91084 2002-02-22 21:11:03Z markm $";
46#endif /* not lint */
47
48#include <sys/param.h>
49#include <sys/stat.h>
50
51#include <err.h>
52#include <errno.h>
53#include <limits.h>

--- 72 unchanged lines hidden (view full) ---

126 switch(argc) {
127 case 0:
128 usage();
129 /* NOTREACHED */
130 case 1: /* ln target */
131 exit(linkit(argv[0], ".", 1));
132 case 2: /* ln target source */
133 exit(linkit(argv[0], argv[1], 0));
46#endif /* not lint */
47
48#include <sys/param.h>
49#include <sys/stat.h>
50
51#include <err.h>
52#include <errno.h>
53#include <limits.h>

--- 72 unchanged lines hidden (view full) ---

126 switch(argc) {
127 case 0:
128 usage();
129 /* NOTREACHED */
130 case 1: /* ln target */
131 exit(linkit(argv[0], ".", 1));
132 case 2: /* ln target source */
133 exit(linkit(argv[0], argv[1], 0));
134 default:
134 }
135 /* ln target1 target2 directory */
136 sourcedir = argv[argc - 1];
137 if (hflag && lstat(sourcedir, &sb) == 0 && S_ISLNK(sb.st_mode)) {
138 /*
139 * We were asked not to follow symlinks, but found one at
140 * the target--simulate "not a directory" error
141 */

--- 96 unchanged lines hidden ---
135 }
136 /* ln target1 target2 directory */
137 sourcedir = argv[argc - 1];
138 if (hflag && lstat(sourcedir, &sb) == 0 && S_ISLNK(sb.st_mode)) {
139 /*
140 * We were asked not to follow symlinks, but found one at
141 * the target--simulate "not a directory" error
142 */

--- 96 unchanged lines hidden ---