Lines Matching refs:target
64 int wflag; /* Warn if symlink target does not
152 case 2: /* ln source target */
162 * the target--simulate "not a directory" error
223 linkit(const char *source, const char *target, int isdir)
247 * If the target is a directory (and not a symlink if hflag),
251 (lstat(target, &sb) == 0 && S_ISDIR(sb.st_mode)) ||
252 (!hflag && stat(target, &sb) == 0 && S_ISDIR(sb.st_mode))) {
255 snprintf(path, sizeof(path), "%s/%s", target, p) >=
261 target = path;
277 * to the parent directory of the target.
279 strlcpy(bbuf, target, sizeof(bbuf));
293 exists = !lstat(target, &sb);
295 if (!sflag && samedirent(source, target)) {
297 source, target);
307 if (rmdir(target)) {
308 warn("%s", target);
311 } else if (unlink(target)) {
312 warn("%s", target);
317 fprintf(stderr, "replace %s? ", target);
328 if (rmdir(target)) {
329 warn("%s", target);
332 } else if (unlink(target)) {
333 warn("%s", target);
339 if (sflag ? symlink(source, target) :
340 linkat(AT_FDCWD, source, AT_FDCWD, target,
342 warn("%s", target);
346 (void)printf("%s %c> %s\n", target, linkch, source);