Messages in this thread | | | From | Frodo Looijaard <> | Date | Thu, 29 Jan 2004 23:39:44 +0100 | Subject | Re: PATCH to access old-style FAT fs |
| |
Hi,
I have attached a newer, better behaving version of my patch: * Implements new mount option oldfat for FAT-derived filesystems. * Stops scanning dirs when DIR_Name[0] = 0 when oldfat is set * Writes a 0 to the next entry DIR_Name[0] when overwriting an entry which has DIR_Name[0] = 0 when oldfat is set
It has been tested with both msdos and vfat filesystems and seems to work well (unlike the patch of a few days ago, which had some issues).
Once you get around to cleaning up the code and making the stop-scanning-dirs-on-zero the default way, the patch can be shrunken to include only the third item.
> The above should "goto EODir;". Likewise, another "contiure" of > fat_search_long().
I am not convinced that the goto is always safe, and I am pretty sure that it works now (though not as efficient as possible, perhaps), so I have left that in place for now.
> mark_inode_dirty(dir) is not needed, instead of it we should do > mark_buffer_dirty(bh). > > And this fat_get_entry() updates bh and de, but it should be point to > allocated bh and de, not free entry. It's needed by msdos_add_entry().
Both are now implemented using the new fat_write_zero_entry function.
Thanks for your help, Frodo
-- Frodo Looijaard <frodol@dds.nl> PGP key and more: http://huizen.dds.nl/~frodol Defenestration n. (formal or joc.): The act of removing Windows from your computer in disgust, usually followed by the installation of Linux or some other Unix-like operating system. [unhandled content-type:application/octet-stream] | |