struct stat* stbuf)
{
memset(stbuf, 0, sizeof(struct stat));
- if (node->flags & EXFAT_ATTRIB_DIR)
+ if (node->attrib & EXFAT_ATTRIB_DIR)
stbuf->st_mode = S_IFDIR | (0777 & ~ef->dmask);
else
stbuf->st_mode = S_IFREG | (0777 & ~ef->fmask);
stbuf->st_uid = ef->uid;
stbuf->st_gid = ef->gid;
stbuf->st_size = node->size;
- stbuf->st_blocks = DIV_ROUND_UP(node->size, CLUSTER_SIZE(*ef->sb)) *
- CLUSTER_SIZE(*ef->sb) / 512;
+ stbuf->st_blocks = ROUND_UP(node->size, CLUSTER_SIZE(*ef->sb)) / 512;
stbuf->st_mtime = node->mtime;
stbuf->st_atime = node->atime;
/* set ctime to mtime to ensure we don't break programs that rely on ctime