1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-22 13:05:20 +02:00

Use "/card" instead of "/card/gmenu2x" for disk stats

This commit is contained in:
Lars-Peter Clausen 2010-05-03 14:21:00 +02:00
parent dd0c4eb72a
commit 431e88e021

View File

@ -340,7 +340,7 @@ void GMenu2X::initBG() {
Surface cpu("imgs/cpu.png", confStr["skin"]); Surface cpu("imgs/cpu.png", confStr["skin"]);
Surface volume("imgs/volume.png", confStr["skin"]); Surface volume("imgs/volume.png", confStr["skin"]);
string df = getDiskFree(); string df = getDiskFree();
sd.blit( sc["bgmain"], 3, bottomBarIconY ); sd.blit( sc["bgmain"], 3, bottomBarIconY );
sc["bgmain"]->write( font, df, 22, bottomBarTextY, SFontHAlignLeft, SFontVAlignMiddle ); sc["bgmain"]->write( font, df, 22, bottomBarTextY, SFontHAlignLeft, SFontVAlignMiddle );
volumeX = 27+font->getTextWidth(df); volumeX = 27+font->getTextWidth(df);
@ -1904,7 +1904,7 @@ string GMenu2X::getDiskFree() {
string df = ""; string df = "";
struct statvfs b; struct statvfs b;
int ret = statvfs("/card/gmenu2x", &b); int ret = statvfs("/card", &b);
if (ret==0) { if (ret==0) {
unsigned long long free = b.f_bfree * b.f_bsize / 1048576; unsigned long long free = b.f_bfree * b.f_bsize / 1048576;
unsigned long long total = b.f_blocks * b.f_frsize / 1048576; unsigned long long total = b.f_blocks * b.f_frsize / 1048576;