projects
/
unix-history
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
This commit was manufactured by cvs2svn to create tag 'FreeBSD-release/1.0'.
[unix-history]
/
gnu
/
libexec
/
uucp
/
libunix
/
link.c
/* link.c
Link two files. */
#include
"uucp.h"
#include
"uudefs.h"
#include
"sysdep.h"
#include
"system.h"
#include <errno.h>
boolean
fsysdep_link
(
zfrom
,
zto
,
pfworked
)
const char
*
zfrom
;
const char
*
zto
;
boolean
*
pfworked
;
{
*
pfworked
=
FALSE
;
if
(
link
(
zfrom
,
zto
) ==
0
)
{
*
pfworked
=
TRUE
;
return
TRUE
;
}
if
(
errno
==
ENOENT
)
{
if
(!
fsysdep_make_dirs
(
zto
,
TRUE
))
return
FALSE
;
if
(
link
(
zfrom
,
zto
) ==
0
)
{
*
pfworked
=
TRUE
;
return
TRUE
;
}
}
if
(
errno
==
EXDEV
)
return
TRUE
;
ulog
(
LOG_ERROR
,
"link (%s, %s): %s"
,
zfrom
,
zto
,
strerror
(
errno
));
return
FALSE
;
}