For certain file system sizes (in particular, exact GB sizes -
don't ask me why) a Technisat HD S2 Plus DVB receiver will still
choke on mkdosfs generated file systems, even if the sectors per
cluster problem is fixed.

By comparing the properties of generated FAT32 FS with results
of the Windows tool "h2format" (www.heise.de/download/h2format.html),
I found that the remaining problems were caused by rounding of the
reserved sectors and FAT space to cluster size (the h2format tool
doesn't do this).
---
 src/mkdosfs.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/src/mkdosfs.c b/src/mkdosfs.c
index a3505b4..3affe73 100644
--- a/src/mkdosfs.c
+++ b/src/mkdosfs.c
@@ -861,8 +861,7 @@ static void setup_tables(void)
            maxclustsize = 128;
 
        do {
-           fatdata32 = num_sectors
-               - align_object(reserved_sectors, bs.cluster_size);
+           fatdata32 = num_sectors - reserved_sectors;
            fatdata1216 = fatdata32
                - align_object(root_dir_sectors, bs.cluster_size);
 
@@ -1011,10 +1010,6 @@ static void setup_tables(void)
            die("FAT not 12, 16 or 32 bits");
        }
 
-       /* Adjust the reserved number of sectors for alignment */
-       reserved_sectors = align_object(reserved_sectors, bs.cluster_size);
-       bs.reserved = CT_LE_W(reserved_sectors);
-
        /* Adjust the number of root directory entries to help enforce 
alignment */
        if (align_structures) {
            root_dir_entries = align_object(root_dir_sectors, bs.cluster_size)
-- 
1.7.3.4


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to