summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ed58e46)
SCCS-vsn: bin/ln/ln.c 4.4
-static char sccsid[] = "@(#)ln.c 4.3 %G%";
+static char sccsid[] = "@(#)ln.c 4.4 %G%";
/*
* ln
*/
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
/*
* ln
*/
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
struct stat stb;
int fflag; /* force flag set? */
int sflag;
char name[BUFSIZ];
char *rindex();
struct stat stb;
int fflag; /* force flag set? */
int sflag;
char name[BUFSIZ];
char *rindex();
main(argc, argv)
int argc;
main(argc, argv)
int argc;
to = name;
}
if ((*linkf)(from, to) < 0) {
to = name;
}
if ((*linkf)(from, to) < 0) {
+ if (errno == EEXIST)
+ perror(to);
+ else
+ perror(from);
return (1);
}
return (0);
return (1);
}
return (0);