mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-28 12:45:13 +00:00
Be optionally verbose about free-space checking. I need this to ascertian
whether or not this always works.
This commit is contained in:
parent
ac0776aed7
commit
90c00ca832
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3445
|
@ -1,5 +1,5 @@
|
|||
#ifndef lint
|
||||
static const char *rcsid = "$Id: pen.c,v 1.3 1993/09/05 04:54:23 jkh Exp $";
|
||||
static const char *rcsid = "$Id: pen.c,v 1.4 1994/10/04 16:07:50 jkh Exp $";
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -55,6 +55,8 @@ make_playpen(char *pen, size_t sz)
|
|||
barf("Can't mktemp '%s'.", Pen);
|
||||
if (mkdir(Pen, 0755) == FAIL)
|
||||
barf("Can't mkdir '%s'.", Pen);
|
||||
if (Verbose)
|
||||
fprintf(stderr, "Projected package size: %d bytes, free space: %d bytes\n", sz, min_free(Pen));
|
||||
if (min_free(Pen) < sz) {
|
||||
rmdir(Pen);
|
||||
barf("%s doesn't have enough free space. Please set your TMPDIR\nenvironment variable to a location with more space and\ntry the command again.", Pen);
|
||||
|
|
Loading…
Reference in a new issue