The copy_hierarchy function is never called. Remove its definition and

prototype.
This commit is contained in:
agc 1999-08-20 09:20:20 +00:00
parent b41eccc5cd
commit cf95737b8e
2 changed files with 3 additions and 35 deletions

View File

@ -1,11 +1,11 @@
/* $NetBSD: file.c,v 1.29 1999/08/19 14:12:35 agc Exp $ */
/* $NetBSD: file.c,v 1.30 1999/08/20 09:20:20 agc Exp $ */
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char *rcsid = "from FreeBSD Id: file.c,v 1.29 1997/10/08 07:47:54 charnier Exp";
#else
__RCSID("$NetBSD: file.c,v 1.29 1999/08/19 14:12:35 agc Exp $");
__RCSID("$NetBSD: file.c,v 1.30 1999/08/20 09:20:20 agc Exp $");
#endif
#endif
@ -548,37 +548,6 @@ move_file(char *dir, char *fname, char *to)
}
}
/*
* Copy a hierarchy (possibly from dir) to the current directory, or
* if "to" is TRUE, from the current directory to a location someplace
* else.
*
* Though slower, using tar to copy preserves symlinks and everything
* without me having to write some big hairy routine to do it.
*/
void
copy_hierarchy(char *dir, char *fname, Boolean to)
{
char cmd[FILENAME_MAX * 3];
if (!to) {
/* If absolute path, use it */
if (*fname == '/')
dir = "/";
(void) snprintf(cmd, sizeof(cmd), "%s cf - -C %s %s | %s xpf -",
TAR_CMD, dir, fname, TAR_CMD);
} else
(void) snprintf(cmd, sizeof(cmd), "%s cf - %s | %s xpf - -C %s",
TAR_CMD, fname, dir, TAR_CMD);
#ifdef DEBUG
printf("Using '%s' to copy trees.\n", cmd);
#endif
if (system(cmd)) {
cleanup(0);
errx(2, "copy_file: could not perform '%s'", cmd);
}
}
/* Unpack a tar file */
int
unpack(char *pkg, char *flist)

View File

@ -1,4 +1,4 @@
/* $NetBSD: lib.h,v 1.22 1999/08/19 14:12:35 agc Exp $ */
/* $NetBSD: lib.h,v 1.23 1999/08/20 09:20:20 agc Exp $ */
/* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */
@ -197,7 +197,6 @@ Boolean make_preserve_name(char *, size_t, char *, char *);
void write_file(char *, char *);
void copy_file(char *, char *, char *);
void move_file(char *, char *, char *);
void copy_hierarchy(char *, char *, Boolean);
int delete_hierarchy(char *, Boolean, Boolean);
int unpack(char *, char *);
void format_cmd(char *, size_t , char *, char *, char *);