summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-11-15 00:42:34 +0000
committerMike Frysinger <vapier@gentoo.org>2005-11-15 00:42:34 +0000
commit2717977c6161d90cef0c6b2c7a49471e0d0ba596 (patch)
tree9877bf910da35587524adcf396598a6f21f56fa2 /sys-fs/dosfstools/files
parentuse @sections@ from the configure script in makewhatis rather than hardcoding... (diff)
downloadgentoo-2-2717977c6161d90cef0c6b2c7a49471e0d0ba596.tar.gz
gentoo-2-2717977c6161d90cef0c6b2c7a49471e0d0ba596.tar.bz2
gentoo-2-2717977c6161d90cef0c6b2c7a49471e0d0ba596.zip
Fix by Ulrich Mueller for generation of filesystems on 256meg devices #112504.
(Portage version: 2.0.53_rc7)
Diffstat (limited to 'sys-fs/dosfstools/files')
-rw-r--r--sys-fs/dosfstools/files/digest-dosfstools-2.11-r11
-rw-r--r--sys-fs/dosfstools/files/dosfstools-2.11-fat32size.patch46
2 files changed, 47 insertions, 0 deletions
diff --git a/sys-fs/dosfstools/files/digest-dosfstools-2.11-r1 b/sys-fs/dosfstools/files/digest-dosfstools-2.11-r1
new file mode 100644
index 000000000000..6f106d56fc2a
--- /dev/null
+++ b/sys-fs/dosfstools/files/digest-dosfstools-2.11-r1
@@ -0,0 +1 @@
+MD5 407d405ade410f7597d364ab5dc8c9f6 dosfstools-2.11.src.tar.gz 68346
diff --git a/sys-fs/dosfstools/files/dosfstools-2.11-fat32size.patch b/sys-fs/dosfstools/files/dosfstools-2.11-fat32size.patch
new file mode 100644
index 000000000000..5047155dd841
--- /dev/null
+++ b/sys-fs/dosfstools/files/dosfstools-2.11-fat32size.patch
@@ -0,0 +1,46 @@
+Fix generation of FAT filesystems on devices that are 256meg in size
+
+Patch by Ulrich Mueller and accepted upstream
+
+http://bugs.gentoo.org/112504
+
+--- mkdosfs/mkdosfs.c
++++ mkdosfs/mkdosfs.c
+@@ -769,18 +769,19 @@
+ size_fat = 32;
+ }
+ if (size_fat == 32) {
+- /* For FAT32, try to do the same as M$'s format command:
+- * fs size < 256M: 0.5k clusters
+- * fs size < 8G: 4k clusters
+- * fs size < 16G: 8k clusters
+- * fs size >= 16G: 16k clusters
++ /* For FAT32, try to do the same as M$'s format command
++ * (see http://www.win.tue.nl/~aeb/linux/fs/fat/fatgen103.pdf p. 20):
++ * fs size <= 260M: 0.5k clusters
++ * fs size <= 8G: 4k clusters
++ * fs size <= 16G: 8k clusters
++ * fs size > 16G: 16k clusters
+ */
+ unsigned long sz_mb =
+ (blocks+(1<<(20-BLOCK_SIZE_BITS))-1) >> (20-BLOCK_SIZE_BITS);
+- bs.cluster_size = sz_mb >= 16*1024 ? 32 :
+- sz_mb >= 8*1024 ? 16 :
+- sz_mb >= 256 ? 8 :
+- 1;
++ bs.cluster_size = sz_mb > 16*1024 ? 32 :
++ sz_mb > 8*1024 ? 16 :
++ sz_mb > 260 ? 8 :
++ 1;
+ }
+ else {
+ /* FAT12 and FAT16: start at 4 sectors per cluster */
+@@ -1036,6 +1037,8 @@
+ break;
+
+ case 32:
++ if (clust32 < MIN_CLUST_32)
++ fprintf(stderr, "WARNING: Not enough clusters for a 32 bit FAT!\n");
+ cluster_count = clust32;
+ fat_length = fatlength32;
+ bs.fat_length = CT_LE_W(0);