These are the current calculations for getting totalspace and usedspace,
which get reported to the frontend.
totalspace = (statbuf.f_blocks - (statbuf.f_bfree - statbuf.f_bavail)) /
(1024*1024/statbuf.f_bsize);
usedspace = (statbuf.f_blocks - statbuf.f_bavail) /
(1024*1024/statbuf.f_bsize);
totalspace is adjusted to show total space for a non-root user, but
usedspace isnt. You can end up with the issue I have been seeing, which
is usedspace > totalspace when I really have 50G free.
patch attached.
jim
--- mythtv.orig/programs/mythbackend/mainserver.cpp 2005-02-09
13:35:13.000000000 -0800
+++ mythtv//programs/mythbackend/mainserver.cpp 2005-02-16 18:39:30.099747320
-0800
@@ -1560,8 +1560,7 @@
// total space available to user is total blocks - reserved blocks
totalspace = (statbuf.f_blocks - (statbuf.f_bfree - statbuf.f_bavail))
/
(1024*1024/statbuf.f_bsize);
- usedspace = (statbuf.f_blocks - statbuf.f_bavail) /
- (1024*1024/statbuf.f_bsize);
+ usedspace = totalspace - (statbuf.f_bavail /
(1024*1024/statbuf.f_bsize));
}
if (ismaster)
_______________________________________________
mythtv-dev mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev