summaryrefslogtreecommitdiffstats
path: root/exfat/mkfs/mkexfat.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--exfat/mkfs/mkexfat.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/exfat/mkfs/mkexfat.c b/exfat/mkfs/mkexfat.c
index c5c86d9b8..4b7a344c8 100644
--- a/exfat/mkfs/mkexfat.c
+++ b/exfat/mkfs/mkexfat.c
@@ -3,7 +3,7 @@
FS creation engine.
Free exFAT implementation.
- Copyright (C) 2011-2013 Andrew Nayenko
+ Copyright (C) 2011-2015 Andrew Nayenko
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -20,17 +20,17 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include "mkexfat.h"
#include <sys/types.h>
#include <unistd.h>
#include <inttypes.h>
#include <stdio.h>
#include <string.h>
-#include "mkexfat.h"
-static int check_size(off64_t volume_size)
+static int check_size(off_t volume_size)
{
const struct fs_object** pp;
- off64_t position = 0;
+ off_t position = 0;
for (pp = objects; *pp; pp++)
{
@@ -52,12 +52,12 @@ static int check_size(off64_t volume_size)
}
static int erase_object(struct exfat_dev* dev, const void* block,
- size_t block_size, off64_t start, off64_t size)
+ size_t block_size, off_t start, off_t size)
{
- const off64_t block_count = DIV_ROUND_UP(size, block_size);
- off64_t i;
+ const off_t block_count = DIV_ROUND_UP(size, block_size);
+ off_t i;
- if (exfat_seek(dev, start, SEEK_SET) == (off64_t) -1)
+ if (exfat_seek(dev, start, SEEK_SET) == (off_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;
- off64_t position = 0;
+ off_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;
- off64_t position = 0;
+ off_t position = 0;
for (pp = objects; *pp; pp++)
{
position = ROUND_UP(position, (*pp)->get_alignment());
- if (exfat_seek(dev, position, SEEK_SET) == (off64_t) -1)
+ if (exfat_seek(dev, position, SEEK_SET) == (off_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, off64_t volume_size)
+int mkfs(struct exfat_dev* dev, off_t volume_size)
{
if (check_size(volume_size) != 0)
return 1;
@@ -146,10 +146,10 @@ int mkfs(struct exfat_dev* dev, off64_t volume_size)
return 0;
}
-off64_t get_position(const struct fs_object* object)
+off_t get_position(const struct fs_object* object)
{
const struct fs_object** pp;
- off64_t position = 0;
+ off_t position = 0;
for (pp = objects; *pp; pp++)
{