Bug 571210 Fix GetDiskSpaceAvailable for Solaris r=roc

This commit is contained in:
Ginn Chen 2010-06-23 17:32:17 +08:00
parent b3fe610590
commit c988c4dd44

View File

@ -1234,7 +1234,12 @@ nsLocalFile::GetDiskSpaceAvailable(PRInt64 *aDiskSpaceAvailable)
* a non-superuser, minus one as a fudge factor, multiplied by the size
* of the aforementioned blocks.
*/
#ifdef SOLARIS
/* On Solaris, unit is f_frsize. */
*aDiskSpaceAvailable = (PRInt64)fs_buf.f_frsize * (fs_buf.f_bavail - 1);
#else
*aDiskSpaceAvailable = (PRInt64)fs_buf.f_bsize * (fs_buf.f_bavail - 1);
#endif /* SOLARIS */
#if defined(USE_LINUX_QUOTACTL)