dosfstools: update to v4.0

This updates dosfstools to the latest release available and uses the new
automatically generated Makefiles instead of a hard coded compilation.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
Álvaro Fernández Rojas
2016-10-11 12:14:03 +02:00
parent fe48e6c802
commit dcd7fcfa5b
5 changed files with 79 additions and 74 deletions
@@ -0,0 +1,34 @@
From 1e76e5778a1885452939a79d9145b80634a5b023 Mon Sep 17 00:00:00 2001
From: Andreas Bombe <aeb@debian.org>
Date: Wed, 11 May 2016 03:44:58 +0200
Subject: [PATCH] mkfs: Default to 64/32 heads/sectors for targets smaller than
512 MB
This may put defaults in certain use cases a little bit more in line
with the old defaults in versions up to 3.0.28. It has mostly aesthetic
value in most cases.
Signed-off-by: Andreas Bombe <aeb@debian.org>
---
src/mkfs.fat.c | 10 ++++++++++
1 file changed, 10 insertions(+)
--- a/src/mkfs.fat.c
+++ b/src/mkfs.fat.c
@@ -519,6 +519,16 @@ static void establish_params(struct devi
unsigned int cluster_size = 4; /* starting point for FAT12 and FAT16 */
int def_root_dir_entries = 512;
+ if (info->size < 512 * 1024 * 1024) {
+ /*
+ * These values are more or less meaningless, but we can at least
+ * use less extreme values for smaller filesystems where the large
+ * dummy values signifying LBA only access are not needed.
+ */
+ sec_per_track = 32;
+ heads = 64;
+ }
+
if (info->type != TYPE_FIXED) {
/* enter default parameters for floppy disks if the size matches */
switch (info->size / 1024) {
@@ -0,0 +1,27 @@
From 1c6c135ee15e449c1bf2e76d5307f83a3a1d7425 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
Date: Tue, 11 Oct 2016 12:07:48 +0200
Subject: [PATCH] Switch to AC_CHECK_LIB for iconv library linking.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
AC_SEARCH_LIB doesn't work properly for openwrt/lede when building dosfstools
as a package.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/configure.ac
+++ b/configure.ac
@@ -59,7 +59,7 @@ if test "x$with_udev" != "xno"; then
[true])
fi
-AC_SEARCH_LIBS(iconv_open, iconv)
+AC_CHECK_LIB(iconv, iconv_open)
AC_CONFIG_FILES([Makefile src/Makefile src/version.h
manpages/Makefile manpages/mkfs.fat.8
@@ -1,13 +0,0 @@
Index: dosfstools-3.0.28/src/mkfs.fat.c
===================================================================
--- dosfstools-3.0.28.orig/src/mkfs.fat.c
+++ dosfstools-3.0.28/src/mkfs.fat.c
@@ -1412,7 +1412,7 @@ int main(int argc, char **argv)
gettimeofday(&create_timeval, NULL);
create_time = create_timeval.tv_sec;
- volume_id = (u_int32_t) ((create_timeval.tv_sec << 20) | create_timeval.tv_usec); /* Default volume ID = creation time, fudged for more uniqueness */
+ volume_id = (uint32_t) ((create_timeval.tv_sec << 20) | create_timeval.tv_usec); /* Default volume ID = creation time, fudged for more uniqueness */
check_atari();
printf("mkfs.fat " VERSION " (" VERSION_DATE ")\n");