Open dbalsom opened 4 months ago
Oh, that's interesting. To be more specific you are talking about MS-DOS boot sector? It only looks at first 2 entries in root directory and ignores the rest?
I guess there could be a runtime option, but I'm not sure how the API should look like. Having it as a filesystem option (FsOptions
) feels wrong, because you may want to create other files with LFN. It would have to be a flag for Dir::create_file
, but I wouldn't want everyone to pass true/false
there... I wish Rust had defaults for parameters. Perhaps I should reproduce something like OpenOptions
from std lib to allow extensibility.
Yes, an MS-DOS boot sector is hardcoded to require those two files as the first entries. For now I have disabled lfn and can create bootable floppies.
Hi! Thanks for the great crate - I've used it to implement mounting directories as disk images in my PC emulator, MartyPC: https://github.com/dbalsom/martypc
I think it would be useful to be able to control whether LFN/Vfat is enabled when writing. It looks like you can disable lfn via a feature flag, but that means you don't have it at all. Any chance this could be controlled at runtime so that I can, say, create IO.SYS and MSDOS.SYS as the first two directory entries to make a bootable diskette? If there is a vfat entry created before them, then the disk is not bootable using a DOS boot sector.