(libT) #3833: 0001-In-OS-X-disk-quota-s-info-already-in-bytes.patch -- patch by taem

This commit is contained in:
Jordan Lee 2013-01-04 02:13:10 +00:00
parent af5572824e
commit 6bf2104141
1 changed files with 5 additions and 1 deletions

View File

@ -856,14 +856,18 @@ getquota (char * device)
#if defined(__FreeBSD__)
spaceused = (int64_t) dq.dqb_curblocks >> 1;
#elif defined(SYS_DARWIN)
spaceused = (int64_t) dq.dqb_curbytes >> 1;
spaceused = (int64_t) dq.dqb_curbytes;
#elif defined(__UCLIBC__)
spaceused = (int64_t) btodb(dq.dqb_curblocks);
#else
spaceused = btodb(dq.dqb_curspace);
#endif
freespace = limit - spaceused;
#ifdef SYS_DARWIN
return (freespace < 0) ? 0 : freespace;
#else
return (freespace < 0) ? 0 : freespace * 1024;
#endif
}
/* something went wrong */