Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regression -spc, -rootdir options were ignored for floppy image made by IMGMAKE command #5172

Merged
merged 2 commits into from
Aug 14, 2024

Conversation

maron2000
Copy link
Contributor

Fix -spc, -rootdir options of IMGMAKE command were ignored for floppy image since commit 4462d88.
Fixes #5171

$ file flptest.img
flptest.img: DOS/MBR boot sector, code offset 0x3c+2, OEM-ID "MSDOS5.0", sectors/cluster 4, FAT  1, root entries 64, sectors 2880 (volumes <=32 MB), sectors/FAT 9, sectors/track 18, serial number 0x9544, unlabeled, FAT (12 bit), followed by FAT

image

@maron2000
Copy link
Contributor Author

Adjustment of sect_per_fat value was required for floppy images with customized root entries and/or fat copies.
fsck.vfat command now runs without errors even after several files are copied to the floppy image.

IMGMAKE fd1200.ima -t fd_1200 -fatcopies 1 -rootdir 32 -spc 1
$ fsck.vfat -v fd1200.ima
fsck.fat 4.2 (2021-01-31)
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "MSDOS5.0"
Media byte 0xf9 (3,5" 720k floppy 2s/80tr/9sec or 5.25" 1.2M floppy 2s/80tr/15sec)
       512 bytes per logical sector
       512 bytes per cluster
         1 reserved sector
First FAT starts at byte 512 (sector 1)
         1 FATs, 12 bit entries
      4096 bytes per FAT (= 8 sectors)
Root directory starts at byte 4608 (sector 9)
        32 root directory entries
Data area starts at byte 5632 (sector 11)
      2389 data clusters (1223168 bytes)
15 sectors/track, 2 heads
         0 hidden sectors
      2400 sectors total
Checking for unused clusters.
fd1200.ima: 31 files, 1148/2389 clusters

image

@joncampbell123 joncampbell123 merged commit 23be2fb into joncampbell123:master Aug 14, 2024
20 checks passed
@maron2000 maron2000 deleted the fix_imgmake_option branch August 16, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IMGMAKE DMF regression in August 2024 nightlies
2 participants