[PATCH 1/2] server: Allow handlers to fail init
Jeremy Kerr
jk at ozlabs.org
Thu Apr 28 17:20:09 AEST 2016
Hi Joel,
>> if (handler->init)
>> - handler->init(handler, console, config);
>> + rc = handler->init(handler, console, config);
>
> you could do handler->active = handler-init(), and drop the rc all
> together.
Ah, but that has the logic reversed :)
I thought I'd keep it simpler by separating the function call from the
'active' check, so bugs like that become more obvious.
Cheers,
Jeremy
More information about the openbmc
mailing list