summaryrefslogtreecommitdiffstats
path: root/exfat/libexfat/cluster.c
diff options
context:
space:
mode:
Diffstat (limited to 'exfat/libexfat/cluster.c')
-rw-r--r--exfat/libexfat/cluster.c18
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;