Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 72871 Details for
Bug 112504
dosfstools-2.11: mkdosfs creates invalid FAT32 filesystem
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
dosfstools-2.11-fat32size.patch
dosfstools-2.11-fat32size.patch (text/plain), 1.33 KB, created by
Ulrich Müller
on 2005-11-14 06:58:33 UTC
(
hide
)
Description:
dosfstools-2.11-fat32size.patch
Filename:
MIME Type:
Creator:
Ulrich Müller
Created:
2005-11-14 06:58:33 UTC
Size:
1.33 KB
patch
obsolete
>--- mkdosfs/mkdosfs.c.orig 2005-03-12 17:12:16.000000000 +0100 >+++ mkdosfs/mkdosfs.c 2005-11-14 15:47:26.000000000 +0100 >@@ -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);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 112504
:
72869
| 72871