From: Siraaj Khandkar Date: Wed, 6 Mar 2019 02:06:55 +0000 (-0500) Subject: Override empty net addr with default place holder X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=6facb1a2a8c8d6c438d8a7163629938ca33924dd;p=khatus.git Override empty net addr with default place holder --- diff --git a/x2/src/awk/exe/bar.awk b/x2/src/awk/exe/bar.awk index b307951..930db5d 100644 --- a/x2/src/awk/exe/bar.awk +++ b/x2/src/awk/exe/bar.awk @@ -162,7 +162,8 @@ function bar_make_status_net_iface_status(interface, addr) { function bar_make_status_net_addr(interface, src) { src = "khatus_sensor_net_addr_io" - return cache_get_fmt_def(src, "addr" Kfs interface, 5, "%s") + addr = cache_get_fmt_def(src, "addr" Kfs interface, 5, "%s") + return addr ? addr : "--" } function bar_make_status_net_io_w(interface, src) {