diff options
author | jkh <jkh@FreeBSD.org> | 1995-08-06 03:21:04 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-08-06 03:21:04 +0000 |
commit | 0fd326e2ae1552f56440a844cabe8978c3951b07 (patch) | |
tree | 2ec83b7c55b0012c9afbffdf0569ee8d19c1f28d /usr.sbin/pkg_install/lib/pen.c | |
parent | 2d0706815533250a730da43ea681a21e1599400b (diff) | |
download | FreeBSD-src-0fd326e2ae1552f56440a844cabe8978c3951b07.zip FreeBSD-src-0fd326e2ae1552f56440a844cabe8978c3951b07.tar.gz |
Make "out of space in ${PKG_TMPDIR}" handling a bit more robust.
Print the right thing, do the right thing. Back to you, Satoshi!
Diffstat (limited to 'usr.sbin/pkg_install/lib/pen.c')
-rw-r--r-- | usr.sbin/pkg_install/lib/pen.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/pkg_install/lib/pen.c b/usr.sbin/pkg_install/lib/pen.c index 37f36ce..2786721 100644 --- a/usr.sbin/pkg_install/lib/pen.c +++ b/usr.sbin/pkg_install/lib/pen.c @@ -1,5 +1,5 @@ #ifndef lint -static const char *rcsid = "$Id: pen.c,v 1.12 1995/04/22 13:58:44 jkh Exp $"; +static const char *rcsid = "$Id: pen.c,v 1.13 1995/04/26 07:43:35 jkh Exp $"; #endif /* @@ -30,6 +30,7 @@ static const char *rcsid = "$Id: pen.c,v 1.12 1995/04/22 13:58:44 jkh Exp $"; /* For keeping track of where we are */ static char Cwd[FILENAME_MAX]; static char Pen[FILENAME_MAX]; +extern char *PlayPen; /* * Make a temporary directory to play in and chdir() to it, returning @@ -45,6 +46,7 @@ make_playpen(char *pen, size_t sz) sprintf(Pen, "%s/instmp.XXXXXX", cp); else strcpy(Pen, "/var/tmp/instmp.XXXXXX"); + PlayPen = Pen; } else strcpy(Pen, pen); @@ -63,6 +65,7 @@ make_playpen(char *pen, size_t sz) if (min_free(Pen) < sz) { rmdir(Pen); barf("Not enough free space to create `%s'.\nPlease set your PKG_TMPDIR environment variable to a location with more space and\ntry the command again.", Pen); + PlayPen = NULL; } if (chdir(Pen) == FAIL) barf("Can't chdir to '%s'.", Pen); |