At 04:01 PM 7/21/2005 -0500, I wrote:

When you invoke FDISK without arguments, it goes into the Interactive_User_Interface() routine. That, in turn, asks about FAT32 support, via Ask_User_About_FAT32_Support() function. OK so far. After that call -- without any further prompting -- FDISK calls the Create_MBR_If_Not_Present() routine.

NO. Please, no. You should never write to the hard disk for low-level stuff like partitions and master boot record data without warning and giving the user a chance to abort or decide not to do it.

Second related issue...the Create_MBR_If_Not_Present() routine receives an error code if Read_Physical_Sectors() routine fails, but the error code is not checked. Consequently, should the routine to read physical sectors fail for any reason and return an error, the following occurs: The buffer which was not loaded by the read is still tested for valid values and if they fail to match what was expected (as they likely will) a new MBR is written.

That is probably the wrong approach to handling an error on the low-level disk read. Particularly at startup.




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to