Displaying 1 result from an estimated 1 matches for "ds64".
Did you mean:
d664
2007 Aug 27
17
statvfs change
...32_MAX && sbp->f_frsize < (1U << 31)) {
+ sbp->f_frsize <<= 1;
+ sbp->f_blocks >>= 1;
+ sbp->f_bfree >>= 1;
+ sbp->f_bavail >>= 1;
+ }
+}
+
static int
cstatvfs32(struct vfs *vfsp, struct statvfs32 *ubp)
{
@@ -114,10 +135,28 @@
if (ds64.f_bfree == (fsblkcnt64_t)-1)
ds64.f_bfree = UINT32_MAX;
+ /*
+ * If we''re about to cause EOVERFLOW with any of the inode
+ * counts, cap the value(s) at UINT32_MAX.
+ */
+ if (ds64.f_files > UINT32_MAX)
+ ds64.f_files = UINT32_MAX;
+ if (ds64.f_ffree > UINT32_MAX)
+ ds64.f_...