summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install/lib/pen.c
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2001-10-10 06:58:42 +0000
committersobomax <sobomax@FreeBSD.org>2001-10-10 06:58:42 +0000
commitf868b9c47960524d92db14074160719f0443e89d (patch)
tree1de2e807d5d23d9f6bc7f84146adea4b1a5d4d51 /usr.sbin/pkg_install/lib/pen.c
parent84f950f9779920910dd92f9d0d2fed07abb54e35 (diff)
downloadFreeBSD-src-f868b9c47960524d92db14074160719f0443e89d.zip
FreeBSD-src-f868b9c47960524d92db14074160719f0443e89d.tar.gz
WARNS=2 cleanup.
Tested on: i386, alpha MFC after: 2 weeks
Diffstat (limited to 'usr.sbin/pkg_install/lib/pen.c')
-rw-r--r--usr.sbin/pkg_install/lib/pen.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/pkg_install/lib/pen.c b/usr.sbin/pkg_install/lib/pen.c
index 62465bf..f80763c 100644
--- a/usr.sbin/pkg_install/lib/pen.c
+++ b/usr.sbin/pkg_install/lib/pen.c
@@ -41,7 +41,7 @@ where_playpen(void)
/* Find a good place to play. */
static char *
-find_play_pen(char *pen, size_t sz)
+find_play_pen(char *pen, off_t sz)
{
char *cp;
struct stat sb;
@@ -62,8 +62,8 @@ find_play_pen(char *pen, size_t sz)
cleanup(0);
errx(2, __FUNCTION__
": can't find enough temporary space to extract the files, please set your\n"
-"PKG_TMPDIR environment variable to a location with at least %d bytes\n"
-"free", sz);
+"PKG_TMPDIR environment variable to a location with at least %ld bytes\n"
+"free", (long)sz);
return NULL;
}
return pen;
@@ -74,7 +74,7 @@ static char *pstack[MAX_STACK];
static int pdepth = -1;
static void
-pushPen(char *pen)
+pushPen(const char *pen)
{
if (++pdepth == MAX_STACK)
errx(2, __FUNCTION__ ": stack overflow.\n");
@@ -97,7 +97,7 @@ popPen(char *pen)
* pathname of previous working directory.
*/
char *
-make_playpen(char *pen, size_t sz)
+make_playpen(char *pen, off_t sz)
{
if (!find_play_pen(pen, sz))
return NULL;
@@ -113,7 +113,7 @@ make_playpen(char *pen, size_t sz)
if (Verbose) {
if (sz)
- fprintf(stderr, "Requested space: %d bytes, free space: %qd bytes in %s\n", (int)sz, min_free(pen), pen);
+ fprintf(stderr, "Requested space: %d bytes, free space: %qd bytes in %s\n", (int)sz, (long long)min_free(pen), pen);
}
if (min_free(pen) < sz) {
@@ -165,7 +165,7 @@ leave_playpen()
}
off_t
-min_free(char *tmpdir)
+min_free(const char *tmpdir)
{
struct statfs buf;
OpenPOWER on IntegriCloud