(libT) #3833: 0001-In-OS-X-disk-quota-s-info-already-in-bytes.patch -- patch by taem
This commit is contained in:
parent
af5572824e
commit
6bf2104141
|
@ -856,14 +856,18 @@ getquota (char * device)
|
||||||
#if defined(__FreeBSD__)
|
#if defined(__FreeBSD__)
|
||||||
spaceused = (int64_t) dq.dqb_curblocks >> 1;
|
spaceused = (int64_t) dq.dqb_curblocks >> 1;
|
||||||
#elif defined(SYS_DARWIN)
|
#elif defined(SYS_DARWIN)
|
||||||
spaceused = (int64_t) dq.dqb_curbytes >> 1;
|
spaceused = (int64_t) dq.dqb_curbytes;
|
||||||
#elif defined(__UCLIBC__)
|
#elif defined(__UCLIBC__)
|
||||||
spaceused = (int64_t) btodb(dq.dqb_curblocks);
|
spaceused = (int64_t) btodb(dq.dqb_curblocks);
|
||||||
#else
|
#else
|
||||||
spaceused = btodb(dq.dqb_curspace);
|
spaceused = btodb(dq.dqb_curspace);
|
||||||
#endif
|
#endif
|
||||||
freespace = limit - spaceused;
|
freespace = limit - spaceused;
|
||||||
|
#ifdef SYS_DARWIN
|
||||||
|
return (freespace < 0) ? 0 : freespace;
|
||||||
|
#else
|
||||||
return (freespace < 0) ? 0 : freespace * 1024;
|
return (freespace < 0) ? 0 : freespace * 1024;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* something went wrong */
|
/* something went wrong */
|
||||||
|
|
Loading…
Reference in New Issue