On 10/12/2010 08:54 AM, Markus Armbruster wrote:

I think the proper thing to do is remove all exit(1)s and propagate
errors instead.
exit() is good enough during startup, i.e. -device.  It's wrong for hot
plug; anything to be used in a hot plug path must propagate errors.  We
could keep exiting in code that's only used by non-hotpluggable devices.

I'm not really suggesting that we move exit()s out of all devices right now. Am just suggesting that we bump them up one level.

A simple approach would be to make register_ioport_{read,write}()
return an int, then do a query-replace on the source tree to make all
invocations of it simply check the return value and exit if it's
non-zero.
In similar cases, we've used a simple FOO_nofail() wrapper in places
that want to exit.

I'll see what I can do.

I prefer propagating the exit but am not deeply opposed to nofail().

Regards,

Anthony Liguori

Reply via email to