Oleg Drokin wrote:
>
> Hello!
>
> > > > progname, XDisplayName(display_name));
> > > > + exit(1);
> > > Thought about it a little more, is it worth it to make all init metods to return
> > > meaningful value, so we can check them in plugin_init, and
> > > return error if something goes wrong?
> > We need to make a plugin_abort() function in plugin.c
> > that handles all aborts from plugins cleanly.
> But plugin_init return value is checked already and if non zero -
> we think that plugin is aborted due to errors.
> Why do we need one more function for that?
Hmm no, we're talking about two different things:
I was commenting the exit(1) you added to the BOCHS
plugin. In stead of doing that, I suggest putting
a plugin_abort() function in plugin.c. Then,
a plugin wanting to abort the VM always needs to
call plugin_abort(). plugin_abort() decides how
to abort the VM depending on the situation; it may
do exit() if the VM isn't running yet, or set
break_vm and abort_vm if it is. That eliminates
the need of accounting for such things in the
plugins.
-- Ramon