mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
Merge branch 'uncool/dvbsi++' commit 9ec9ae527b
Conflicts:
src/driver/framebuffer.cpp
Origin commit data
------------------
Branch: ni/coolstream
Commit: 8d69036be5
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-01-03 (Thu, 03 Jan 2013)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -193,7 +193,7 @@ int check_dir(const char * dir)
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool get_fs_usage(const char * dir, long &btotal, long &bused)
|
||||
bool get_fs_usage(const char * dir, long &btotal, long &bused, long *bsize/*=NULL*/)
|
||||
{
|
||||
btotal = bused = 0;
|
||||
struct statfs s;
|
||||
@@ -201,6 +201,8 @@ bool get_fs_usage(const char * dir, long &btotal, long &bused)
|
||||
if (::statfs(dir, &s) == 0 && s.f_blocks) {
|
||||
btotal = s.f_blocks;
|
||||
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);
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user