j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
The copy-resolutions-property copies all the resolutions from the resolutions property of the options node to the resolutions property of the QEMU,VGA node. This is used to support specifying resolutions via the command-line.
Signed-off-by: John Arbuckle programmingkidx@gmail.com --- arch/ppc/qemu/qemu.fs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
diff --git a/arch/ppc/qemu/qemu.fs b/arch/ppc/qemu/qemu.fs index 3d99a34..2a83fe7 100644 --- a/arch/ppc/qemu/qemu.fs +++ b/arch/ppc/qemu/qemu.fs @@ -138,3 +138,27 @@ variable keyboard-phandle 0 keyboard-phandle ! 3drop 0 then ; + +\ Copies the resolutions property from the /options node to QEMU,VGA node + +: copy-resolutions-property ( -- ) + " /options" find-package + if + active-package! + " resolutions" active-package get-package-property false = + if + " /pci/QEMU,VGA" find-package + if + active-package! + " resolutions" + property + else + cr ." copy-resolutions-property: Failed to find QEMU,VGA package!" cr + then + else + cr ." copy-resolutions-property: Failed to find resolutions property!" cr + then + else + cr ." copy-resolutions-property: Failed to find options node!" cr + then +;
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?
[ inverted control flow deleted ]
- 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?
Segher
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?
[ inverted control flow deleted ]
Would you be able to give me an example of what you prefer the code to look like?
- 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?
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.
Segher