diff --git a/usr.sbin/pkg_install/lib/lib.h b/usr.sbin/pkg_install/lib/lib.h index d0e770b19152..2dafbc60b7d9 100644 --- a/usr.sbin/pkg_install/lib/lib.h +++ b/usr.sbin/pkg_install/lib/lib.h @@ -1,4 +1,4 @@ -/* $Id: lib.h,v 1.18 1995/08/26 10:15:12 jkh Exp $ */ +/* $Id: lib.h,v 1.19 1995/10/25 15:38:34 jkh Exp $ */ /* * FreeBSD install - a package for the installation and maintainance @@ -109,7 +109,7 @@ void cleanup(int); char *make_playpen(char *, size_t); char *where_playpen(void); void leave_playpen(char *); -size_t min_free(char *); +off_t min_free(char *); /* String */ char *get_dash_string(char **); diff --git a/usr.sbin/pkg_install/lib/pen.c b/usr.sbin/pkg_install/lib/pen.c index e5873e14f912..98a7d713a52a 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.19 1995/10/25 15:38:35 jkh Exp $"; +static const char *rcsid = "$Id: pen.c,v 1.20 1996/02/09 12:05:26 jkh Exp $"; #endif /* @@ -87,7 +87,7 @@ make_playpen(char *pen, size_t sz) } if (Verbose) { if (sz) - fprintf(stderr, "Requested space: %d bytes, free space: %d 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, min_free(pen), pen); } if (min_free(pen) < sz) { rmdir(pen); @@ -130,7 +130,7 @@ leave_playpen(char *save) signal(SIGINT, oldsig); } -size_t +off_t min_free(char *tmpdir) { struct statfs buf; @@ -139,5 +139,5 @@ min_free(char *tmpdir) perror("Error in statfs"); return -1; } - return buf.f_bavail * buf.f_bsize; + return (off_t)buf.f_bavail * (off_t)buf.f_bsize; }