Patch to make it possible to re-attempt to mount ROMFS

Øyvind Harboe oyvind.harboe@zylin.com
Thu Sep 25 08:02:00 GMT 2003


If a mount fails, mounting a romfs still
modify cyg_mtab_entry->data. With the patch included,
cyg_mtab_entry->data is only modified after a succesful
mount.

This makes the following codepath impossible:

char address[16];	
sprintf( address, "%p", ROMDIR_ADDR);
err = mount( address, "rom", "romfs" );
if( err < 0 ) 
{
	// if no ROM fs has been written, we use a default one.
	sprintf( address, "%p", _binary___mkromfs_rom_rawdata_start);
	err = mount( address, "rom", "romfs" );
	if (err<0)
      {
 		// unrecoverable failure
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rom.txt
URL: <http://sourceware.org/pipermail/ecos-patches/attachments/20030925/e0eeaa2d/attachment.txt>


More information about the Ecos-patches mailing list