OSDN Git Service

Fix negative IUsed in "df -i" output.
authorrelan <relan@users.noreply.github.com>
Sun, 4 May 2014 16:42:07 +0000 (16:42 +0000)
committerrelan <relan@users.noreply.github.com>
Mon, 24 Aug 2015 05:26:16 +0000 (08:26 +0300)
fuse/main.c

index eba936b..b9b412a 100644 (file)
@@ -323,7 +323,7 @@ static int fuse_exfat_statfs(const char* path, struct statvfs* sfs)
           b) no such thing as inode;
           So here we assume that inode = cluster.
        */
-       sfs->f_files = (sfs->f_blocks - sfs->f_bfree) >> ef.sb->spc_bits;
+       sfs->f_files = le32_to_cpu(ef.sb->cluster_count);
        sfs->f_favail = sfs->f_bfree >> ef.sb->spc_bits;
        sfs->f_ffree = sfs->f_bavail;