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/mkfs/mkexfat.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 'exfat/mkfs/mkexfat.c')
-rw-r--r-- | exfat/mkfs/mkexfat.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/exfat/mkfs/mkexfat.c b/exfat/mkfs/mkexfat.c index 4b7a344c8..0929062be 100644 --- a/exfat/mkfs/mkexfat.c +++ b/exfat/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++) { |