Message ID | 1498206565-12282-1-git-send-email-thuth@redhat.com |
---|---|
State | Accepted |
Headers | show |
On 23/06/17 18:29, Thomas Huth wrote: > If virtio-net-open fails, SLOF currently prints out an ugly error > message: "virtio-net-open failedexiting". This happens because > there is no "cr" after the error message in the open function, and > virtio-net-init prints that other unhelpful error message "exiting" > right afterwards. > Fix it by issuing a CR in the open function already, and by removing > the unhelpful message from virtio-net-init. > > Signed-off-by: Thomas Huth <thuth@redhat.com> Thanks, applied. > --- > board-qemu/slof/virtio-net.fs | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/board-qemu/slof/virtio-net.fs b/board-qemu/slof/virtio-net.fs > index b43d8e9..4a4ac05 100644 > --- a/board-qemu/slof/virtio-net.fs > +++ b/board-qemu/slof/virtio-net.fs > @@ -35,7 +35,8 @@ virtio-setup-vd VALUE virtiodev > open-count 0= IF > open IF > \ my-unit 1 rtas-set-tce-bypass > - virtiodev virtio-net-open not IF ." virtio-net-open failed" false EXIT THEN > + virtiodev virtio-net-open > + not IF ." virtio-net-open failed" cr false EXIT THEN > TO virtio-net-priv > setup-mac true > ELSE > @@ -94,7 +95,7 @@ setup-alias > > \ Create instance, this will populate the mac address > : virtio-net-init ( -- ) > - 0 0 get-node open-node ?dup 0= IF ." exiting " cr EXIT THEN > - close-node > + 0 0 get-node open-node > + ?dup IF close-node THEN > ; > virtio-net-init >
diff --git a/board-qemu/slof/virtio-net.fs b/board-qemu/slof/virtio-net.fs index b43d8e9..4a4ac05 100644 --- a/board-qemu/slof/virtio-net.fs +++ b/board-qemu/slof/virtio-net.fs @@ -35,7 +35,8 @@ virtio-setup-vd VALUE virtiodev open-count 0= IF open IF \ my-unit 1 rtas-set-tce-bypass - virtiodev virtio-net-open not IF ." virtio-net-open failed" false EXIT THEN + virtiodev virtio-net-open + not IF ." virtio-net-open failed" cr false EXIT THEN TO virtio-net-priv setup-mac true ELSE @@ -94,7 +95,7 @@ setup-alias \ Create instance, this will populate the mac address : virtio-net-init ( -- ) - 0 0 get-node open-node ?dup 0= IF ." exiting " cr EXIT THEN - close-node + 0 0 get-node open-node + ?dup IF close-node THEN ; virtio-net-init
If virtio-net-open fails, SLOF currently prints out an ugly error message: "virtio-net-open failedexiting". This happens because there is no "cr" after the error message in the open function, and virtio-net-init prints that other unhelpful error message "exiting" right afterwards. Fix it by issuing a CR in the open function already, and by removing the unhelpful message from virtio-net-init. Signed-off-by: Thomas Huth <thuth@redhat.com> --- board-qemu/slof/virtio-net.fs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)