[OpenBIOS] [PATCH 1/2] Implement copy-resolutions-property
segher at kernel.crashing.org
Sun Sep 25 08:57:15 CEST 2016
On Sun, Sep 25, 2016 at 12:58:51AM -0400, Programmingkid wrote:
> On Sep 25, 2016, at 12:39 AM, Segher Boessenkool wrote:
> > On Sat, Sep 24, 2016 at 12:54:59PM -0400, Programmingkid wrote:
> >> +: copy-resolutions-property ( -- )
> >> + " /options" find-package
> >> + if
> >> + active-package!
> > You want find-device I guess?
> What is the difference between find-device and find-package?
find-device is a standard opern firmware word. It sets the active package.
> > [ inverted control flow deleted ]
> Would you be able to give me an example of what you prefer the code to look like?
Handle the error immediately where it happens, not twenty lines below
after a lot of nested stuff. Do not nest stuff at all.
> >> + else
> >> + cr ." copy-resolutions-property: Failed to find options node!" cr
> >> + then
> > If it's an error, call abort" ; if not, don't say anything?
> What advantage does abort" have over the current code?
It stops if there is an error. Continuing after an error is futile.
More information about the OpenBIOS