diff options
-rw-r--r-- | dump/main.c | 2 | ||||
-rw-r--r-- | fuse/main.c | 8 | ||||
-rw-r--r-- | libexfat/cluster.c | 18 | ||||
-rw-r--r-- | libexfat/exfat.h | 18 | ||||
-rw-r--r-- | libexfat/io.c | 20 | ||||
-rw-r--r-- | libexfat/mount.c | 2 | ||||
-rw-r--r-- | libexfat/node.c | 32 | ||||
-rw-r--r-- | libexfat/utils.c | 4 | ||||
-rw-r--r-- | mkfs/cbm.c | 4 | ||||
-rw-r--r-- | mkfs/fat.c | 6 | ||||
-rw-r--r-- | mkfs/main.c | 8 | ||||
-rw-r--r-- | mkfs/mkexfat.c | 24 | ||||
-rw-r--r-- | mkfs/mkexfat.h | 10 | ||||
-rw-r--r-- | mkfs/rootdir.c | 4 | ||||
-rw-r--r-- | mkfs/uct.c | 4 | ||||
-rw-r--r-- | mkfs/vbr.c | 6 |
16 files changed, 85 insertions, 85 deletions
diff --git a/dump/main.c b/dump/main.c index 7ef571d..bb6173f 100644 --- a/dump/main.c +++ b/dump/main.c @@ -106,7 +106,7 @@ static int dump_sb(const char* spec) static void dump_sectors(struct exfat* ef) { - off_t a = 0, b = 0; + loff_t a = 0, b = 0; printf("Used sectors "); while (exfat_find_used_sectors(ef, &a, &b) == 0) diff --git a/fuse/main.c b/fuse/main.c index 8a96c63..4b1d2d9 100644 --- a/fuse/main.c +++ b/fuse/main.c @@ -71,7 +71,7 @@ static int fuse_exfat_getattr(const char* path, struct stat* stbuf) return 0; } -static int fuse_exfat_truncate(const char* path, off_t size) +static int fuse_exfat_truncate(const char* path, loff_t size) { struct exfat_node* node; int rc; @@ -88,7 +88,7 @@ static int fuse_exfat_truncate(const char* path, off_t size) } static int fuse_exfat_readdir(const char* path, void* buffer, - fuse_fill_dir_t filler, off_t offset, struct fuse_file_info* fi) + fuse_fill_dir_t filler, loff_t offset, struct fuse_file_info* fi) { struct exfat_node* parent; struct exfat_node* node; @@ -170,7 +170,7 @@ static int fuse_exfat_fsync(const char* path, int datasync, } static int fuse_exfat_read(const char* path, char* buffer, size_t size, - off_t offset, struct fuse_file_info* fi) + loff_t offset, struct fuse_file_info* fi) { ssize_t ret; @@ -182,7 +182,7 @@ static int fuse_exfat_read(const char* path, char* buffer, size_t size, } static int fuse_exfat_write(const char* path, const char* buffer, size_t size, - off_t offset, struct fuse_file_info* fi) + loff_t offset, struct fuse_file_info* fi) { ssize_t ret; diff --git a/libexfat/cluster.c b/libexfat/cluster.c index 5cabdbb..14418e3 100644 --- a/libexfat/cluster.c +++ b/libexfat/cluster.c @@ -28,7 +28,7 @@ /* * Sector to absolute offset. */ -static off_t s2o(const struct exfat* ef, off_t sector) +static loff_t s2o(const struct exfat* ef, loff_t sector) { return sector << ef->sb->sector_bits; } @@ -36,18 +36,18 @@ static off_t s2o(const struct exfat* ef, off_t sector) /* * Cluster to sector. */ -static off_t c2s(const struct exfat* ef, cluster_t cluster) +static loff_t c2s(const struct exfat* ef, cluster_t cluster) { if (cluster < EXFAT_FIRST_DATA_CLUSTER) exfat_bug("invalid cluster number %u", cluster); return le32_to_cpu(ef->sb->cluster_sector_start) + - ((off_t) (cluster - EXFAT_FIRST_DATA_CLUSTER) << ef->sb->spc_bits); + ((loff_t) (cluster - EXFAT_FIRST_DATA_CLUSTER) << ef->sb->spc_bits); } /* * Cluster to absolute offset. */ -off_t exfat_c2o(const struct exfat* ef, cluster_t cluster) +loff_t exfat_c2o(const struct exfat* ef, cluster_t cluster) { return s2o(ef, c2s(ef, cluster)); } @@ -55,7 +55,7 @@ off_t exfat_c2o(const struct exfat* ef, cluster_t cluster) /* * Sector to cluster. */ -static cluster_t s2c(const struct exfat* ef, off_t sector) +static cluster_t s2c(const struct exfat* ef, loff_t sector) { return ((sector - le32_to_cpu(ef->sb->cluster_sector_start)) >> ef->sb->spc_bits) + EXFAT_FIRST_DATA_CLUSTER; @@ -74,7 +74,7 @@ cluster_t exfat_next_cluster(const struct exfat* ef, const struct exfat_node* node, cluster_t cluster) { le32_t next; - off_t fat_offset; + loff_t fat_offset; if (cluster < EXFAT_FIRST_DATA_CLUSTER) exfat_bug("bad cluster 0x%x", cluster); @@ -155,7 +155,7 @@ int exfat_flush(struct exfat* ef) static bool set_next_cluster(const struct exfat* ef, bool contiguous, cluster_t current, cluster_t next) { - off_t fat_offset; + loff_t fat_offset; le32_t next_le32; if (contiguous) @@ -339,7 +339,7 @@ static int shrink_file(struct exfat* ef, struct exfat_node* node, return 0; } -static bool erase_raw(struct exfat* ef, size_t size, off_t offset) +static bool erase_raw(struct exfat* ef, size_t size, loff_t offset) { if (exfat_pwrite(ef->dev, ef->zero_cluster, size, offset) < 0) { @@ -452,7 +452,7 @@ static int find_used_clusters(const struct exfat* ef, return 0; } -int exfat_find_used_sectors(const struct exfat* ef, off_t* a, off_t* b) +int exfat_find_used_sectors(const struct exfat* ef, loff_t* a, loff_t* b) { cluster_t ca, cb; diff --git a/libexfat/exfat.h b/libexfat/exfat.h index 50f690c..4aaead9 100644 --- a/libexfat/exfat.h +++ b/libexfat/exfat.h @@ -73,7 +73,7 @@ struct exfat_node uint32_t fptr_index; cluster_t fptr_cluster; cluster_t entry_cluster; - off_t entry_offset; + loff_t entry_offset; cluster_t start_cluster; int flags; uint64_t size; @@ -139,18 +139,18 @@ struct exfat_dev* exfat_open(const char* spec, enum exfat_mode mode); int exfat_close(struct exfat_dev* dev); int exfat_fsync(struct exfat_dev* dev); enum exfat_mode exfat_get_mode(const struct exfat_dev* dev); -off_t exfat_get_size(const struct exfat_dev* dev); -off_t exfat_seek(struct exfat_dev* dev, off_t offset, int whence); +loff_t exfat_get_size(const struct exfat_dev* dev); +loff_t exfat_seek(struct exfat_dev* dev, loff_t offset, int whence); ssize_t exfat_read(struct exfat_dev* dev, void* buffer, size_t size); ssize_t exfat_write(struct exfat_dev* dev, const void* buffer, size_t size); ssize_t exfat_pread(struct exfat_dev* dev, void* buffer, size_t size, - off_t offset); + loff_t offset); ssize_t exfat_pwrite(struct exfat_dev* dev, const void* buffer, size_t size, - off_t offset); + loff_t offset); ssize_t exfat_generic_pread(const struct exfat* ef, struct exfat_node* node, - void* buffer, size_t size, off_t offset); + void* buffer, size_t size, loff_t offset); ssize_t exfat_generic_pwrite(struct exfat* ef, struct exfat_node* node, - const void* buffer, size_t size, off_t offset); + const void* buffer, size_t size, loff_t offset); int exfat_opendir(struct exfat* ef, struct exfat_node* dir, struct exfat_iterator* it); @@ -161,7 +161,7 @@ int exfat_lookup(struct exfat* ef, struct exfat_node** node, int exfat_split(struct exfat* ef, struct exfat_node** parent, struct exfat_node** node, le16_t* name, const char* path); -off_t exfat_c2o(const struct exfat* ef, cluster_t cluster); +loff_t exfat_c2o(const struct exfat* ef, cluster_t cluster); cluster_t exfat_next_cluster(const struct exfat* ef, const struct exfat_node* node, cluster_t cluster); cluster_t exfat_advance_cluster(const struct exfat* ef, @@ -170,7 +170,7 @@ int exfat_flush(struct exfat* ef); int exfat_truncate(struct exfat* ef, struct exfat_node* node, uint64_t size, bool erase); uint32_t exfat_count_free_clusters(const struct exfat* ef); -int exfat_find_used_sectors(const struct exfat* ef, off_t* a, off_t* b); +int exfat_find_used_sectors(const struct exfat* ef, loff_t* a, loff_t* b); void exfat_stat(const struct exfat* ef, const struct exfat_node* node, struct stat* stbuf); diff --git a/libexfat/io.c b/libexfat/io.c index 32172ce..a5b471c 100644 --- a/libexfat/io.c +++ b/libexfat/io.c @@ -40,9 +40,9 @@ struct exfat_dev { int fd; enum exfat_mode mode; - off_t size; /* in bytes */ + loff_t size; /* in bytes */ #ifdef USE_UBLIO - off_t pos; + loff_t pos; ublio_filehandle_t ufh; #endif }; @@ -243,12 +243,12 @@ enum exfat_mode exfat_get_mode(const struct exfat_dev* dev) return dev->mode; } -off_t exfat_get_size(const struct exfat_dev* dev) +loff_t exfat_get_size(const struct exfat_dev* dev) { return dev->size; } -off_t exfat_seek(struct exfat_dev* dev, off_t offset, int whence) +loff_t exfat_seek(struct exfat_dev* dev, loff_t offset, int whence) { #ifdef USE_UBLIO /* XXX SEEK_CUR will be handled incorrectly */ @@ -285,7 +285,7 @@ ssize_t exfat_write(struct exfat_dev* dev, const void* buffer, size_t size) } ssize_t exfat_pread(struct exfat_dev* dev, void* buffer, size_t size, - off_t offset) + loff_t offset) { #ifdef USE_UBLIO return ublio_pread(dev->ufh, buffer, size, offset); @@ -297,7 +297,7 @@ ssize_t exfat_pread(struct exfat_dev* dev, void* buffer, size_t size, } ssize_t exfat_pwrite(struct exfat_dev* dev, const void* buffer, size_t size, - off_t offset) + loff_t offset) { #ifdef USE_UBLIO return ublio_pwrite(dev->ufh, buffer, size, offset); @@ -309,11 +309,11 @@ ssize_t exfat_pwrite(struct exfat_dev* dev, const void* buffer, size_t size, } ssize_t exfat_generic_pread(const struct exfat* ef, struct exfat_node* node, - void* buffer, size_t size, off_t offset) + void* buffer, size_t size, loff_t offset) { cluster_t cluster; char* bufp = buffer; - off_t lsize, loffset, remainder; + loff_t lsize, loffset, remainder; if (offset >= node->size) return 0; @@ -354,11 +354,11 @@ ssize_t exfat_generic_pread(const struct exfat* ef, struct exfat_node* node, } ssize_t exfat_generic_pwrite(struct exfat* ef, struct exfat_node* node, - const void* buffer, size_t size, off_t offset) + const void* buffer, size_t size, loff_t offset) { cluster_t cluster; const char* bufp = buffer; - off_t lsize, loffset, remainder; + loff_t lsize, loffset, remainder; if (offset > node->size) if (exfat_truncate(ef, node, offset, true) != 0) diff --git a/libexfat/mount.c b/libexfat/mount.c index d10fc98..ff5c699 100644 --- a/libexfat/mount.c +++ b/libexfat/mount.c @@ -92,7 +92,7 @@ static void parse_options(struct exfat* ef, const char* options) } static int verify_vbr_checksum(struct exfat_dev* dev, void* sector, - off_t sector_size) + loff_t sector_size) { uint32_t vbr_checksum; int i; diff --git a/libexfat/node.c b/libexfat/node.c index fea371b..85d0726 100644 --- a/libexfat/node.c +++ b/libexfat/node.c @@ -29,7 +29,7 @@ struct iterator { cluster_t cluster; - off_t offset; + loff_t offset; int contiguous; char* chunk; }; @@ -71,7 +71,7 @@ void exfat_put_node(struct exfat* ef, struct exfat_node* node) /** * Cluster + offset from the beginning of the directory to absolute offset. */ -static off_t co2o(struct exfat* ef, cluster_t cluster, off_t offset) +static loff_t co2o(struct exfat* ef, cluster_t cluster, loff_t offset) { return exfat_c2o(ef, cluster) + offset % CLUSTER_SIZE(*ef->sb); } @@ -545,7 +545,7 @@ void exfat_reset_cache(struct exfat* ef) } static void next_entry(struct exfat* ef, const struct exfat_node* parent, - cluster_t* cluster, off_t* offset) + cluster_t* cluster, loff_t* offset) { *offset += sizeof(struct exfat_entry); if (*offset % CLUSTER_SIZE(*ef->sb) == 0) @@ -556,8 +556,8 @@ static void next_entry(struct exfat* ef, const struct exfat_node* parent, int exfat_flush_node(struct exfat* ef, struct exfat_node* node) { cluster_t cluster; - off_t offset; - off_t meta1_offset, meta2_offset; + loff_t offset; + loff_t meta1_offset, meta2_offset; struct exfat_entry_meta1 meta1; struct exfat_entry_meta2 meta2; @@ -622,7 +622,7 @@ int exfat_flush_node(struct exfat* ef, struct exfat_node* node) static bool erase_entry(struct exfat* ef, struct exfat_node* node) { cluster_t cluster = node->entry_cluster; - off_t offset = node->entry_offset; + loff_t offset = node->entry_offset; int name_entries = DIV_ROUND_UP(utf16_length(node->name), EXFAT_ENAME_MAX); uint8_t entry_type; @@ -656,7 +656,7 @@ static bool erase_entry(struct exfat* ef, struct exfat_node* node) } static int shrink_directory(struct exfat* ef, struct exfat_node* dir, - off_t deleted_offset) + loff_t deleted_offset) { const struct exfat_node* node; const struct exfat_node* last_node; @@ -707,7 +707,7 @@ static int shrink_directory(struct exfat* ef, struct exfat_node* dir, static int delete(struct exfat* ef, struct exfat_node* node) { struct exfat_node* parent = node->parent; - off_t deleted_offset = node->entry_offset; + loff_t deleted_offset = node->entry_offset; int rc; exfat_get_node(parent); @@ -752,7 +752,7 @@ static int grow_directory(struct exfat* ef, struct exfat_node* dir, } static int find_slot(struct exfat* ef, struct exfat_node* dir, - cluster_t* cluster, off_t* offset, int subentries) + cluster_t* cluster, loff_t* offset, int subentries) { struct iterator it; int rc; @@ -797,7 +797,7 @@ static int find_slot(struct exfat* ef, struct exfat_node* dir, } static int write_entry(struct exfat* ef, struct exfat_node* dir, - const le16_t* name, cluster_t cluster, off_t offset, uint16_t attrib) + const le16_t* name, cluster_t cluster, loff_t offset, uint16_t attrib) { struct exfat_node* node; struct exfat_entry_meta1 meta1; @@ -873,7 +873,7 @@ static int create(struct exfat* ef, const char* path, uint16_t attrib) struct exfat_node* dir; struct exfat_node* existing; cluster_t cluster = EXFAT_CLUSTER_BAD; - off_t offset = -1; + loff_t offset = -1; le16_t name[EXFAT_NAME_MAX + 1]; int rc; @@ -929,12 +929,12 @@ int exfat_mkdir(struct exfat* ef, const char* path) static int rename_entry(struct exfat* ef, struct exfat_node* dir, struct exfat_node* node, const le16_t* name, cluster_t new_cluster, - off_t new_offset) + loff_t new_offset) { struct exfat_entry_meta1 meta1; struct exfat_entry_meta2 meta2; cluster_t old_cluster = node->entry_cluster; - off_t old_offset = node->entry_offset; + loff_t old_offset = node->entry_offset; const size_t name_length = utf16_length(name); const int name_entries = DIV_ROUND_UP(name_length, EXFAT_ENAME_MAX); int i; @@ -1003,7 +1003,7 @@ int exfat_rename(struct exfat* ef, const char* old_path, const char* new_path) struct exfat_node* existing; struct exfat_node* dir; cluster_t cluster = EXFAT_CLUSTER_BAD; - off_t offset = -1; + loff_t offset = -1; le16_t name[EXFAT_NAME_MAX + 1]; int rc; @@ -1103,7 +1103,7 @@ const char* exfat_get_label(struct exfat* ef) return ef->label; } -static int find_label(struct exfat* ef, cluster_t* cluster, off_t* offset) +static int find_label(struct exfat* ef, cluster_t* cluster, loff_t* offset) { struct iterator it; int rc; @@ -1141,7 +1141,7 @@ int exfat_set_label(struct exfat* ef, const char* label) le16_t label_utf16[EXFAT_ENAME_MAX + 1]; int rc; cluster_t cluster; - off_t offset; + loff_t offset; struct exfat_entry_label entry; memset(label_utf16, 0, sizeof(label_utf16)); diff --git a/libexfat/utils.c b/libexfat/utils.c index 8b6aaf9..31fba5d 100644 --- a/libexfat/utils.c +++ b/libexfat/utils.c @@ -161,8 +161,8 @@ void exfat_print_info(const struct exfat_super_block* sb, uint32_t free_clusters) { struct exfat_human_bytes hb; - off_t total_space = le64_to_cpu(sb->sector_count) * SECTOR_SIZE(*sb); - off_t avail_space = (off_t) free_clusters * CLUSTER_SIZE(*sb); + loff_t total_space = le64_to_cpu(sb->sector_count) * SECTOR_SIZE(*sb); + loff_t avail_space = (loff_t) free_clusters * CLUSTER_SIZE(*sb); printf("File system version %hhu.%hhu\n", sb->version.major, sb->version.minor); @@ -26,12 +26,12 @@ #include "rootdir.h" #include <limits.h> -static off_t cbm_alignment(void) +static loff_t cbm_alignment(void) { return get_cluster_size(); } -static off_t cbm_size(void) +static loff_t cbm_size(void) { return DIV_ROUND_UP( (get_volume_size() - get_position(&cbm)) / get_cluster_size(), @@ -27,12 +27,12 @@ #include "uct.h" #include "rootdir.h" -static off_t fat_alignment(void) +static loff_t fat_alignment(void) { - return (off_t) 128 * get_sector_size(); + return (loff_t) 128 * get_sector_size(); } -static off_t fat_size(void) +static loff_t fat_size(void) { return get_volume_size() / get_cluster_size() * sizeof(cluster_t); } diff --git a/mkfs/main.c b/mkfs/main.c index dafe970..e0fed57 100644 --- a/mkfs/main.c +++ b/mkfs/main.c @@ -51,7 +51,7 @@ static struct { int sector_bits; int spc_bits; - off_t volume_size; + loff_t volume_size; le16_t volume_label[EXFAT_ENAME_MAX + 1]; uint32_t volume_serial; uint64_t first_sector; @@ -68,7 +68,7 @@ int get_spc_bits(void) return param.spc_bits; } -off_t get_volume_size(void) +loff_t get_volume_size(void) { return param.volume_size; } @@ -98,13 +98,13 @@ int get_cluster_size(void) return get_sector_size() << get_spc_bits(); } -static int setup_spc_bits(int sector_bits, int user_defined, off_t volume_size) +static int setup_spc_bits(int sector_bits, int user_defined, loff_t volume_size) { int i; if (user_defined != -1) { - off_t cluster_size = 1 << sector_bits << user_defined; + loff_t cluster_size = 1 << sector_bits << user_defined; if (volume_size / cluster_size > EXFAT_LAST_DATA_CLUSTER) { struct exfat_human_bytes chb, vhb; diff --git a/mkfs/mkexfat.c b/mkfs/mkexfat.c index e7f8aac..a7492bd 100644 --- a/mkfs/mkexfat.c +++ b/mkfs/mkexfat.c @@ -27,10 +27,10 @@ #include <stdio.h> #include <string.h> -static int check_size(off_t volume_size) +static int check_size(loff_t volume_size) { const struct fs_object** pp; - off_t position = 0; + loff_t position = 0; for (pp = objects; *pp; pp++) { @@ -52,12 +52,12 @@ static int check_size(off_t volume_size) } static int erase_object(struct exfat_dev* dev, const void* block, - size_t block_size, off_t start, off_t size) + size_t block_size, loff_t start, loff_t size) { - const off_t block_count = DIV_ROUND_UP(size, block_size); - off_t i; + const loff_t block_count = DIV_ROUND_UP(size, block_size); + loff_t i; - if (exfat_seek(dev, start, SEEK_SET) == (off_t) -1) + if (exfat_seek(dev, start, SEEK_SET) == (loff_t) -1) { exfat_error("seek to 0x%"PRIx64" failed", start); return 1; @@ -77,7 +77,7 @@ static int erase_object(struct exfat_dev* dev, const void* block, static int erase(struct exfat_dev* dev) { const struct fs_object** pp; - off_t position = 0; + loff_t position = 0; const size_t block_size = 1024 * 1024; void* block = malloc(block_size); @@ -107,12 +107,12 @@ static int erase(struct exfat_dev* dev) static int create(struct exfat_dev* dev) { const struct fs_object** pp; - off_t position = 0; + loff_t position = 0; for (pp = objects; *pp; pp++) { position = ROUND_UP(position, (*pp)->get_alignment()); - if (exfat_seek(dev, position, SEEK_SET) == (off_t) -1) + if (exfat_seek(dev, position, SEEK_SET) == (loff_t) -1) { exfat_error("seek to 0x%"PRIx64" failed", position); return 1; @@ -124,7 +124,7 @@ static int create(struct exfat_dev* dev) return 0; } -int mkfs(struct exfat_dev* dev, off_t volume_size) +int mkfs(struct exfat_dev* dev, loff_t volume_size) { if (check_size(volume_size) != 0) return 1; @@ -146,10 +146,10 @@ int mkfs(struct exfat_dev* dev, off_t volume_size) return 0; } -off_t get_position(const struct fs_object* object) +loff_t get_position(const struct fs_object* object) { const struct fs_object** pp; - off_t position = 0; + loff_t position = 0; for (pp = objects; *pp; pp++) { diff --git a/mkfs/mkexfat.h b/mkfs/mkexfat.h index 61428c5..f248f8f 100644 --- a/mkfs/mkexfat.h +++ b/mkfs/mkexfat.h @@ -27,8 +27,8 @@ struct fs_object { - off_t (*get_alignment)(void); - off_t (*get_size)(void); + loff_t (*get_alignment)(void); + loff_t (*get_size)(void); int (*write)(struct exfat_dev* dev); }; @@ -36,14 +36,14 @@ extern const struct fs_object* objects[]; int get_sector_bits(void); int get_spc_bits(void); -off_t get_volume_size(void); +loff_t get_volume_size(void); const le16_t* get_volume_label(void); uint32_t get_volume_serial(void); uint64_t get_first_sector(void); int get_sector_size(void); int get_cluster_size(void); -int mkfs(struct exfat_dev* dev, off_t volume_size); -off_t get_position(const struct fs_object* object); +int mkfs(struct exfat_dev* dev, loff_t volume_size); +loff_t get_position(const struct fs_object* object); #endif /* ifndef MKFS_MKEXFAT_H_INCLUDED */ diff --git a/mkfs/rootdir.c b/mkfs/rootdir.c index 55385a0..f5ab3a0 100644 --- a/mkfs/rootdir.c +++ b/mkfs/rootdir.c @@ -26,12 +26,12 @@ #include "uctc.h" #include <string.h> -static off_t rootdir_alignment(void) +static loff_t rootdir_alignment(void) { return get_cluster_size(); } -static off_t rootdir_size(void) +static loff_t rootdir_size(void) { return get_cluster_size(); } @@ -23,12 +23,12 @@ #include "uct.h" #include "uctc.h" -static off_t uct_alignment(void) +static loff_t uct_alignment(void) { return get_cluster_size(); } -static off_t uct_size(void) +static loff_t uct_size(void) { return sizeof(upcase_table); } @@ -27,12 +27,12 @@ #include "rootdir.h" #include <string.h> -static off_t vbr_alignment(void) +static loff_t vbr_alignment(void) { return get_sector_size(); } -static off_t vbr_size(void) +static loff_t vbr_size(void) { return 12 * get_sector_size(); } @@ -43,7 +43,7 @@ static void init_sb(struct exfat_super_block* sb) uint32_t fat_sectors; clusters_max = get_volume_size() / get_cluster_size(); - fat_sectors = DIV_ROUND_UP((off_t) clusters_max * sizeof(cluster_t), + fat_sectors = DIV_ROUND_UP((loff_t) clusters_max * sizeof(cluster_t), get_sector_size()); memset(sb, 0, sizeof(struct exfat_super_block)); |