Utility/libdiskfree.c
unsigned long long int diskfree(const char *path) {
#ifdef UNKNOWN
	errno = 1;
	return 0;
#else
	unsigned long long int available, blocksize;
	struct STATSTRUCT buf;

	if (STATCALL(path, &buf) != 0)
		return 0; /* errno is set */
	else
		errno = 0;

	available = buf.f_bavail;
	blocksize = buf.f_bsize;
	return available * blocksize;
#endif
}
/* Checks the amount of disk that is available to regular (non-root) users.
 * (If there's an error, or this is not supported,
 * returns 0 and sets errno to nonzero.)
 */
Checks the amount of disk that is available to regular (non-root) users.
(If there's an error, or this is not supported,
returns 0 and sets errno to nonzero.)
Checks the amount of disk that is available to regular ( non - root ) users . ( If there ' s an error or this is not supported returns 0 and sets errno to nonzero . )
unsigned long long int diskfree(const char *path) {
#ifdef UNKNOWN
	errno = 1;
	return 0;
#else
	unsigned long long int available, blocksize;
	struct STATSTRUCT buf;
	if (STATCALL(path, &buf) != 0)
		return 0; 
	else
		errno = 0;
	available = buf.f_bavail;
	blocksize = buf.f_bsize;
	return available * blocksize;
#endif
}
unsigned long long int diskfree ( const char * path ) { #ifdef UNKNOWN errno = 1 ; return 0 ; #else unsigned long long int available , blocksize ; struct STATSTRUCT buf ; if ( STATCALL ( path , & buf ) != 0 ) return 0 ; else errno = 0 ; available = buf . f_bavail ; blocksize = buf . f_bsize ; return available * blocksize ; #endif }
Checks the amount of disk that is available to regular (non-root) users.
Checks the amount of disk that is available to regular ( non - root ) users .
/* errno is set */