aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_install/info
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1995-10-25 15:38:37 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1995-10-25 15:38:37 +0000
commit36b7319742ddd913fef91b3fd8b52ed3db79baed (patch)
tree38f96dd54eeecc8a263b88c6c73dd075dcbadb38 /usr.sbin/pkg_install/info
parent59f0c0d522401b5af351f214e49cd7a2f309a832 (diff)
Notes
Diffstat (limited to 'usr.sbin/pkg_install/info')
-rw-r--r--usr.sbin/pkg_install/info/info.h4
-rw-r--r--usr.sbin/pkg_install/info/main.c6
-rw-r--r--usr.sbin/pkg_install/info/perform.c14
3 files changed, 13 insertions, 11 deletions
diff --git a/usr.sbin/pkg_install/info/info.h b/usr.sbin/pkg_install/info/info.h
index 860a27578699..56ad7dbfaab0 100644
--- a/usr.sbin/pkg_install/info/info.h
+++ b/usr.sbin/pkg_install/info/info.h
@@ -1,4 +1,4 @@
-/* $Id: info.h,v 1.6 1994/12/06 00:51:42 jkh Exp $ */
+/* $Id: info.h,v 1.7.4.1 1995/10/09 11:16:25 jkh Exp $ */
/*
* FreeBSD install - a package for the installation and maintainance
@@ -48,7 +48,7 @@ extern int Flags;
extern Boolean AllInstalled;
extern Boolean Quiet;
extern char *InfoPrefix;
-extern char *PlayPen;
+extern char PlayPen[];
extern char *CheckPkg;
extern void show_file(char *, char *);
diff --git a/usr.sbin/pkg_install/info/main.c b/usr.sbin/pkg_install/info/main.c
index d63ff13a5789..bcd78d945537 100644
--- a/usr.sbin/pkg_install/info/main.c
+++ b/usr.sbin/pkg_install/info/main.c
@@ -1,5 +1,5 @@
#ifndef lint
-static char *rcsid = "$Id: main.c,v 1.8 1994/12/06 00:51:44 jkh Exp $";
+static char *rcsid = "$Id: main.c,v 1.9.4.1 1995/10/09 11:16:26 jkh Exp $";
#endif
/*
@@ -32,7 +32,7 @@ int Flags = 0;
Boolean AllInstalled = FALSE;
Boolean Quiet = FALSE;
char *InfoPrefix = "";
-char *PlayPen = NULL;
+char PlayPen[FILENAME_MAX];
char *CheckPkg = NULL;
int
@@ -113,7 +113,7 @@ main(int argc, char **argv)
break;
case 't':
- PlayPen = optarg;
+ strcpy(PlayPen, optarg);
break;
case 'e':
diff --git a/usr.sbin/pkg_install/info/perform.c b/usr.sbin/pkg_install/info/perform.c
index e09abadac569..ed6b259b7596 100644
--- a/usr.sbin/pkg_install/info/perform.c
+++ b/usr.sbin/pkg_install/info/perform.c
@@ -1,5 +1,5 @@
#ifndef lint
-static const char *rcsid = "$Id: perform.c,v 1.16 1995/05/30 03:49:59 rgrimes Exp $";
+static const char *rcsid = "$Id: perform.c,v 1.17 1995/07/30 01:44:38 ache Exp $";
#endif
/*
@@ -73,6 +73,8 @@ pkg_perform(char **pkgs)
return err_cnt;
}
+static char *Home;
+
static int
pkg_do(char *pkg)
{
@@ -86,7 +88,7 @@ pkg_do(char *pkg)
int code = 0;
if (isURL(pkg)) {
- if ((cp = fileGetURL(pkg)) != NULL) {
+ if ((cp = fileGetURL(NULL, pkg)) != NULL) {
strcpy(fname, cp);
isTMP = TRUE;
}
@@ -105,7 +107,7 @@ pkg_do(char *pkg)
cp = fname;
}
else {
- if ((cp = fileFindByPath(pkg)) != NULL)
+ if ((cp = fileFindByPath(NULL, pkg)) != NULL)
strncpy(fname, cp, FILENAME_MAX);
}
if (cp) {
@@ -120,7 +122,7 @@ pkg_do(char *pkg)
code = 1;
goto bail;
}
- (void)make_playpen(PlayPen, sb.st_size / 2);
+ Home = make_playpen(PlayPen, sb.st_size / 2);
if (unpack(fname, "+*")) {
whinge("Error during unpacking, no info for '%s' available.", pkg);
code = 1;
@@ -195,7 +197,7 @@ pkg_do(char *pkg)
}
free_plist(&plist);
bail:
- leave_playpen();
+ leave_playpen(Home);
if (isTMP)
unlink(fname);
return code;
@@ -204,5 +206,5 @@ pkg_do(char *pkg)
void
cleanup(int sig)
{
- leave_playpen();
+ leave_playpen(Home);
}