mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-18 22:15:46 +01:00
Change min_free to return free space as an off_t instead of a size_t.
This commit is contained in:
parent
63bf4575db
commit
3f8b85263c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=16179
@ -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 **);
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user