OSDN Git Service

Pass stat to filler in readdir for dirent->d_type.
[android-x86/external-exfat.git] / fuse / main.c
index 2fd523b..c645390 100644 (file)
@@ -102,6 +102,7 @@ static int fuse_exfat_readdir(const char* path, void* buffer,
        struct exfat_iterator it;
        int rc;
        char name[EXFAT_UTF8_NAME_BUFFER_MAX];
+       struct stat stbuf;
 
        exfat_debug("[%s] %s", __func__, path);
 
@@ -131,7 +132,8 @@ static int fuse_exfat_readdir(const char* path, void* buffer,
                exfat_debug("[%s] %s: %s, %"PRId64" bytes, cluster 0x%x", __func__,
                                name, node->is_contiguous ? "contiguous" : "fragmented",
                                node->size, node->start_cluster);
-               filler(buffer, name, NULL, 0);
+               exfat_stat(&ef, node, &stbuf);
+               filler(buffer, name, &stbuf, 0);
                exfat_put_node(&ef, node);
        }
        exfat_closedir(&ef, &it);