Disk (BSD): fix bytesUsed calculation

Follow up of #508
This commit is contained in:
李通洲
2023-08-01 16:09:20 +08:00
parent 81f7861147
commit 172b3b2968
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ const char* ffDetectDisksImpl(FFlist* disks)
#endif
disk->bytesTotal = fs->f_blocks * fs->f_bsize;
disk->bytesUsed = disk->bytesTotal - ((uint64_t)fs->f_bavail * fs->f_bsize);
disk->bytesUsed = disk->bytesTotal - ((uint64_t)fs->f_bfree * fs->f_bsize);
disk->filesTotal = (uint32_t) fs->f_files;
disk->filesUsed = (uint32_t) (disk->filesTotal - (uint64_t)fs->f_ffree);