diff options
author | Spegelius <spegelius@gmail.com> | 2014-11-23 14:15:06 +0100 |
---|---|---|
committer | Ethan Yonker <dees_troy@teamw.in> | 2015-12-23 18:50:35 +0100 |
commit | d69ac2b18baf0b62f62e0f8b19a861efb7ce536a (patch) | |
tree | d67ff95ff3fb81732287d5cbf512e07eb94904a9 /exfat/libexfat/cluster.c | |
parent | fuse: Update to 2.9.4 (diff) | |
download | android_bootable_recovery-d69ac2b18baf0b62f62e0f8b19a861efb7ce536a.tar android_bootable_recovery-d69ac2b18baf0b62f62e0f8b19a861efb7ce536a.tar.gz android_bootable_recovery-d69ac2b18baf0b62f62e0f8b19a861efb7ce536a.tar.bz2 android_bootable_recovery-d69ac2b18baf0b62f62e0f8b19a861efb7ce536a.tar.lz android_bootable_recovery-d69ac2b18baf0b62f62e0f8b19a861efb7ce536a.tar.xz android_bootable_recovery-d69ac2b18baf0b62f62e0f8b19a861efb7ce536a.tar.zst android_bootable_recovery-d69ac2b18baf0b62f62e0f8b19a861efb7ce536a.zip |
Diffstat (limited to '')
-rw-r--r-- | exfat/libexfat/cluster.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/exfat/libexfat/cluster.c b/exfat/libexfat/cluster.c index fc3657b53..394ca4a22 100644 --- a/exfat/libexfat/cluster.c +++ b/exfat/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); @@ -174,7 +174,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) @@ -359,7 +359,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) { @@ -472,7 +472,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; |