version 1.13, 2001/11/19 19:02:15 |
version 1.14, 2003/04/05 20:31:58 |
|
|
if (path && *path) { |
if (path && *path) { |
cp = strrchr(path, '/'); |
cp = strrchr(path, '/'); |
if (cp == NULL) |
if (cp == NULL) |
(void) sprintf(buff, "%s/%s", dest, path); |
(void) snprintf(buff, sizeof buff, "%s/%s", dest, path); |
else { |
else { |
srclen = strlen(src); |
srclen = strlen(src); |
pathlen = strlen(path); |
pathlen = strlen(path); |
|
|
} |
} |
} |
} |
if ((*cp != '/') && *cp) |
if ((*cp != '/') && *cp) |
(void) sprintf(buff, "%s/%s", dest, cp); |
(void) snprintf(buff, sizeof buff, |
|
"%s/%s", dest, cp); |
else |
else |
(void) sprintf(buff, "%s%s", dest, cp); |
(void) snprintf(buff, sizeof buff, |
|
"%s%s", dest, cp); |
} |
} |
} else |
} else |
strcpy(lname, dest); |
strcpy(lname, dest); |
|
|
error("%s: readlink failed", target); |
error("%s: readlink failed", target); |
err(); |
err(); |
} |
} |
(void) sprintf(tbuf, "%.*s", (int) stb->st_size, lbuf); |
(void) snprintf(tbuf, sizeof tbuf, "%.*s", (int) stb->st_size, lbuf); |
(void) sendcmd(C_NONE, "%s\n", tbuf); |
(void) sendcmd(C_NONE, "%s\n", tbuf); |
|
|
if (n != stb->st_size) { |
if (n != stb->st_size) { |
|
|
char *cp; |
char *cp; |
|
|
cp = getondistoptlist(opts); |
cp = getondistoptlist(opts); |
(void) sprintf(buff, "%s%s%s %s %s", |
(void) snprintf(buff, sizeof buff, "%s%s%s %s %s", |
IS_ON(opts, DO_VERIFY) ? "verify" : "install", |
IS_ON(opts, DO_VERIFY) ? "verify" : "install", |
(cp) ? " -o" : "", (cp) ? cp : "", |
(cp) ? " -o" : "", (cp) ? cp : "", |
src, dest); |
src, dest); |
|
|
* hardlink info. |
* hardlink info. |
*/ |
*/ |
if (destdir || (src && dest && strcmp(src, dest))) { |
if (destdir || (src && dest && strcmp(src, dest))) { |
(void) strcpy(destcopy, dest); |
(void) strlcpy(destcopy, dest, sizeof destcopy); |
Tdest = destcopy; |
Tdest = destcopy; |
} |
} |
|
|