From 895dbdd0dbd74887c9734b0b1dcc7f2f33a5a669 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Fri, 23 Jun 2017 10:29:25 +0200 Subject: virtio-net: Fix ugly error message 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 Signed-off-by: Alexey Kardashevskiy --- 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 -- cgit v1.1