mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
src/system/helpers.cpp: Replace wrong data types in get_fs_usage()
- Change from 'long' to 'uint64_t' - src/Makefile.am: Add -D_FILE_OFFSET_BITS=64 to AM_CPPFLAGS
This commit is contained in:
@@ -241,7 +241,7 @@ int check_dir(const char * dir, bool allow_tmp)
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool get_fs_usage(const char * dir, long &btotal, long &bused, long *bsize/*=NULL*/)
|
||||
bool get_fs_usage(const char * dir, uint64_t &btotal, uint64_t &bused, long *bsize/*=NULL*/)
|
||||
{
|
||||
btotal = bused = 0;
|
||||
struct statfs s;
|
||||
@@ -251,7 +251,7 @@ bool get_fs_usage(const char * dir, long &btotal, long &bused, long *bsize/*=NUL
|
||||
bused = s.f_blocks - s.f_bfree;
|
||||
if (bsize != NULL)
|
||||
*bsize = s.f_bsize;
|
||||
//printf("fs (%s): total %ld used %ld\n", dir, btotal, bused);
|
||||
//printf("fs (%s): total %llu used %llu\n", dir, btotal, bused);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user