diff options
author | alex <alex@FreeBSD.org> | 1996-06-08 00:46:33 +0000 |
---|---|---|
committer | alex <alex@FreeBSD.org> | 1996-06-08 00:46:33 +0000 |
commit | 9500b89e3fcd8159ff14be3a7138389347f69bb2 (patch) | |
tree | 6661b584202358d3c3371d64dda1cd5b9948f7dc | |
parent | 989c61cbbb3c500504ffb558fb497e4b70ff59b1 (diff) | |
download | FreeBSD-src-9500b89e3fcd8159ff14be3a7138389347f69bb2.zip FreeBSD-src-9500b89e3fcd8159ff14be3a7138389347f69bb2.tar.gz |
Change min_free to return free space as an off_t instead of a size_t.
-rw-r--r-- | usr.sbin/pkg_install/lib/lib.h | 4 | ||||
-rw-r--r-- | usr.sbin/pkg_install/lib/pen.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/pkg_install/lib/lib.h b/usr.sbin/pkg_install/lib/lib.h index d0e770b..2dafbc6 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 e5873e1..98a7d71 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; } |