summaryrefslogtreecommitdiffstats
path: root/exfat/mkfs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--exfat/mkfs/cbm.c12
-rw-r--r--exfat/mkfs/cbm.h2
-rw-r--r--exfat/mkfs/fat.c2
-rw-r--r--exfat/mkfs/fat.h2
-rw-r--r--exfat/mkfs/main.c6
-rw-r--r--exfat/mkfs/mkexfat.c2
-rw-r--r--exfat/mkfs/mkexfat.h2
-rw-r--r--exfat/mkfs/mkexfatfs.89
-rw-r--r--exfat/mkfs/rootdir.c2
-rw-r--r--exfat/mkfs/rootdir.h2
-rw-r--r--exfat/mkfs/uct.c2
-rw-r--r--exfat/mkfs/uct.h2
-rw-r--r--exfat/mkfs/uctc.c2
-rw-r--r--exfat/mkfs/uctc.h2
-rw-r--r--exfat/mkfs/vbr.c2
-rw-r--r--exfat/mkfs/vbr.h2
16 files changed, 24 insertions, 29 deletions
diff --git a/exfat/mkfs/cbm.c b/exfat/mkfs/cbm.c
index 189ae32fd..0110b4065 100644
--- a/exfat/mkfs/cbm.c
+++ b/exfat/mkfs/cbm.c
@@ -3,7 +3,7 @@
Clusters Bitmap creation code.
Free exFAT implementation.
- Copyright (C) 2011-2014 Andrew Nayenko
+ Copyright (C) 2011-2013 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
@@ -21,7 +21,6 @@
*/
#include <limits.h>
-#include <string.h>
#include "cbm.h"
#include "fat.h"
#include "uct.h"
@@ -46,23 +45,22 @@ static int cbm_write(struct exfat_dev* dev)
DIV_ROUND_UP(uct.get_size(), get_cluster_size()) +
DIV_ROUND_UP(rootdir.get_size(), get_cluster_size());
size_t bitmap_size = DIV_ROUND_UP(allocated_clusters, CHAR_BIT);
- bitmap_t* bitmap = malloc(BMAP_SIZE(bitmap_size));
+ uint8_t* bitmap = malloc(bitmap_size);
size_t i;
if (bitmap == NULL)
{
- exfat_error("failed to allocate bitmap of %zu bytes",
- BMAP_SIZE(bitmap_size));
+ exfat_error("failed to allocate bitmap of %zu bytes", bitmap_size);
return 1;
}
- memset(bitmap, 0, BMAP_SIZE(bitmap_size));
for (i = 0; i < bitmap_size * CHAR_BIT; i++)
if (i < allocated_clusters)
BMAP_SET(bitmap, i);
+ else
+ BMAP_CLR(bitmap, i);
if (exfat_write(dev, bitmap, bitmap_size) < 0)
{
- free(bitmap);
exfat_error("failed to write bitmap of %zu bytes", bitmap_size);
return 1;
}
diff --git a/exfat/mkfs/cbm.h b/exfat/mkfs/cbm.h
index f959124de..b9d285013 100644
--- a/exfat/mkfs/cbm.h
+++ b/exfat/mkfs/cbm.h
@@ -3,7 +3,7 @@
Clusters Bitmap creation code.
Free exFAT implementation.
- Copyright (C) 2011-2014 Andrew Nayenko
+ Copyright (C) 2011-2013 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
diff --git a/exfat/mkfs/fat.c b/exfat/mkfs/fat.c
index 25d37a2e8..9ed90223e 100644
--- a/exfat/mkfs/fat.c
+++ b/exfat/mkfs/fat.c
@@ -3,7 +3,7 @@
File Allocation Table creation code.
Free exFAT implementation.
- Copyright (C) 2011-2014 Andrew Nayenko
+ Copyright (C) 2011-2013 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
diff --git a/exfat/mkfs/fat.h b/exfat/mkfs/fat.h
index bd30fe300..1327f0acc 100644
--- a/exfat/mkfs/fat.h
+++ b/exfat/mkfs/fat.h
@@ -3,7 +3,7 @@
File Allocation Table creation code.
Free exFAT implementation.
- Copyright (C) 2011-2014 Andrew Nayenko
+ Copyright (C) 2011-2013 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
diff --git a/exfat/mkfs/main.c b/exfat/mkfs/main.c
index 87f25db42..3c3c3829f 100644
--- a/exfat/mkfs/main.c
+++ b/exfat/mkfs/main.c
@@ -3,7 +3,7 @@
Creates exFAT file system.
Free exFAT implementation.
- Copyright (C) 2011-2014 Andrew Nayenko
+ Copyright (C) 2011-2013 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
@@ -224,12 +224,12 @@ int main(int argc, char* argv[])
spc_bits = logarithm2(atoi(optarg));
if (spc_bits < 0)
{
- exfat_error("invalid option value: '%s'", optarg);
+ exfat_error("invalid option value: `%s'", optarg);
return 1;
}
break;
case 'V':
- puts("Copyright (C) 2011-2014 Andrew Nayenko");
+ puts("Copyright (C) 2011-2013 Andrew Nayenko");
return 0;
default:
usage(argv[0]);
diff --git a/exfat/mkfs/mkexfat.c b/exfat/mkfs/mkexfat.c
index df6391aab..c5c86d9b8 100644
--- a/exfat/mkfs/mkexfat.c
+++ b/exfat/mkfs/mkexfat.c
@@ -3,7 +3,7 @@
FS creation engine.
Free exFAT implementation.
- Copyright (C) 2011-2014 Andrew Nayenko
+ Copyright (C) 2011-2013 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
diff --git a/exfat/mkfs/mkexfat.h b/exfat/mkfs/mkexfat.h
index a9e49488f..d0685afa7 100644
--- a/exfat/mkfs/mkexfat.h
+++ b/exfat/mkfs/mkexfat.h
@@ -3,7 +3,7 @@
FS creation engine.
Free exFAT implementation.
- Copyright (C) 2011-2014 Andrew Nayenko
+ Copyright (C) 2011-2013 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
diff --git a/exfat/mkfs/mkexfatfs.8 b/exfat/mkfs/mkexfatfs.8
index 8f5e53bfc..5f6ba3db7 100644
--- a/exfat/mkfs/mkexfatfs.8
+++ b/exfat/mkfs/mkexfatfs.8
@@ -1,4 +1,4 @@
-.\" Copyright (C) 2011-2014 Andrew Nayenko
+.\" Copyright (C) 2011 Andrew Nayenko
.\"
.TH MKEXFATFS 8 "January 2011"
.SH NAME
@@ -31,10 +31,7 @@
.B mkexfatfs
creates an exFAT file system on a block device.
.I device
-is a special file corresponding to the partition on the device. Note that if
-this is an MBR partition then the file system type should be set to 0x07
-(NTFS/exFAT) otherwise other operating systems may refuse to mount the
-file system.
+is a special file corresponding to the device.
.SH OPTIONS
Command line options available:
@@ -68,4 +65,4 @@ Zero is returned on successful creation. Any other code means an error.
Andrew Nayenko
.SH SEE ALSO
-.BR mkfs (8), fdisk (8)
+.BR mkfs (8)
diff --git a/exfat/mkfs/rootdir.c b/exfat/mkfs/rootdir.c
index f453131f6..49d364324 100644
--- a/exfat/mkfs/rootdir.c
+++ b/exfat/mkfs/rootdir.c
@@ -3,7 +3,7 @@
Root directory creation code.
Free exFAT implementation.
- Copyright (C) 2011-2014 Andrew Nayenko
+ Copyright (C) 2011-2013 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
diff --git a/exfat/mkfs/rootdir.h b/exfat/mkfs/rootdir.h
index ddf5f418f..2d1d3453c 100644
--- a/exfat/mkfs/rootdir.h
+++ b/exfat/mkfs/rootdir.h
@@ -3,7 +3,7 @@
Root directory creation code.
Free exFAT implementation.
- Copyright (C) 2011-2014 Andrew Nayenko
+ Copyright (C) 2011-2013 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
diff --git a/exfat/mkfs/uct.c b/exfat/mkfs/uct.c
index 912940350..5f173233c 100644
--- a/exfat/mkfs/uct.c
+++ b/exfat/mkfs/uct.c
@@ -3,7 +3,7 @@
Upper Case Table creation code.
Free exFAT implementation.
- Copyright (C) 2011-2014 Andrew Nayenko
+ Copyright (C) 2011-2013 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
diff --git a/exfat/mkfs/uct.h b/exfat/mkfs/uct.h
index 6f276de47..ef3339218 100644
--- a/exfat/mkfs/uct.h
+++ b/exfat/mkfs/uct.h
@@ -3,7 +3,7 @@
Upper Case Table creation code.
Free exFAT implementation.
- Copyright (C) 2011-2014 Andrew Nayenko
+ Copyright (C) 2011-2013 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
diff --git a/exfat/mkfs/uctc.c b/exfat/mkfs/uctc.c
index b5aa17d0f..1ee8efe3f 100644
--- a/exfat/mkfs/uctc.c
+++ b/exfat/mkfs/uctc.c
@@ -3,7 +3,7 @@
Upper Case Table contents.
Free exFAT implementation.
- Copyright (C) 2011-2014 Andrew Nayenko
+ Copyright (C) 2011-2013 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
diff --git a/exfat/mkfs/uctc.h b/exfat/mkfs/uctc.h
index c492ec24c..3e7dee0ef 100644
--- a/exfat/mkfs/uctc.h
+++ b/exfat/mkfs/uctc.h
@@ -3,7 +3,7 @@
Upper Case Table declaration.
Free exFAT implementation.
- Copyright (C) 2011-2014 Andrew Nayenko
+ Copyright (C) 2011-2013 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
diff --git a/exfat/mkfs/vbr.c b/exfat/mkfs/vbr.c
index b3889e554..bbf1304d9 100644
--- a/exfat/mkfs/vbr.c
+++ b/exfat/mkfs/vbr.c
@@ -3,7 +3,7 @@
Volume Boot Record creation code.
Free exFAT implementation.
- Copyright (C) 2011-2014 Andrew Nayenko
+ Copyright (C) 2011-2013 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
diff --git a/exfat/mkfs/vbr.h b/exfat/mkfs/vbr.h
index 075938f47..fec88bc1e 100644
--- a/exfat/mkfs/vbr.h
+++ b/exfat/mkfs/vbr.h
@@ -3,7 +3,7 @@
Volume Boot Record creation code.
Free exFAT implementation.
- Copyright (C) 2011-2014 Andrew Nayenko
+ Copyright (C) 2011-2013 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