Hi,
I am resending this as I don't find this patch applied yet.
Currently if the bootdevice image file is not present, plex86 will
continue and then when it tries to read the floppy (with inserted status)
to boot from it, it panics, but the error message displayed won't be
obvious to many people.
This patch, during init stage, sees to it that
a) if the floppy image specified as inserted is not available
and is also the bootdevice, then it panics with a proper message.
b) However if the specified image file is not the bootdevice, it will
continue, without panicing, and, later when someone tries to access the
corresponding device, it will panic as usual.
But I feal, maybe even in the 2nd case also we should break at this
stage itself, rather than waiting for it to be accessed. However I wanted
others also to decide on it so I am not taking care of this 2nd condition
as of now.
On Fri, 17 Nov 2000, Hanish Menon C wrote:
> where the floppy image specified to be the boot device is not available,
> is taken care of
diff -Naur /hanishkvc/tocheck/plex86/plex86/user/plugins/bochs/iodev/floppy.cc
/usr/local/src/plex86/user/plugins/bochs/iodev/floppy.cc
--- /hanishkvc/tocheck/plex86/plex86/user/plugins/bochs/iodev/floppy.cc Mon Aug 14
02:21:01 2000
+++ /usr/local/src/plex86/user/plugins/bochs/iodev/floppy.cc Fri Nov 17 16:54:23
+2000
@@ -116,8 +116,13 @@
BX_FD_THIS s.num_supported_floppies++;
if ( bx_options.floppya.initial_status == BX_INSERTED) {
if (evaluate_media(bx_options.floppya.type, bx_options.floppya.path,
- & BX_FD_THIS s.media[0]))
+ & BX_FD_THIS s.media[0])) {
BX_FD_THIS s.media_present[0] = 1;
+ }
+ else {
+ if(strncmp(bx_options.bootdrive,"a",1) == 0)
+ bx_panic("[Error] Unable to load the boot device floppya\n");
+ }
}
}
@@ -157,8 +162,13 @@
BX_FD_THIS s.num_supported_floppies++;
if ( bx_options.floppyb.initial_status == BX_INSERTED) {
if (evaluate_media(bx_options.floppyb.type, bx_options.floppyb.path,
- & BX_FD_THIS s.media[1]))
+ & BX_FD_THIS s.media[1])) {
BX_FD_THIS s.media_present[1] = 1;
+ }
+ else {
+ if(strncmp(bx_options.bootdrive,"b",1) == 0)
+ bx_panic("[Error] Unable to load the boot device floppyb\n");
+ }
}
}
---------
Keep :-)
HanishKVC
http://www.hanishkvc.com/