summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install/info/perform.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-10-25 15:38:37 +0000
committerjkh <jkh@FreeBSD.org>1995-10-25 15:38:37 +0000
commitd4d9564530f574c891a76bc0ca7af4c9275e9442 (patch)
tree38f96dd54eeecc8a263b88c6c73dd075dcbadb38 /usr.sbin/pkg_install/info/perform.c
parenta31022b303ea5ec7c096c6165e363e3fd1058fee (diff)
downloadFreeBSD-src-d4d9564530f574c891a76bc0ca7af4c9275e9442.zip
FreeBSD-src-d4d9564530f574c891a76bc0ca7af4c9275e9442.tar.gz
Bring forward my changes from 2.1
Diffstat (limited to 'usr.sbin/pkg_install/info/perform.c')
-rw-r--r--usr.sbin/pkg_install/info/perform.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/usr.sbin/pkg_install/info/perform.c b/usr.sbin/pkg_install/info/perform.c
index e09abad..ed6b259 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);
}
OpenPOWER on IntegriCloud