From 8a1cfd99da2d7aa09debf2faf1738671c4ce6976 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Mon, 30 Mar 2020 08:39:31 +0200 Subject: [PATCH] sys/shell: fix ifconfig command for NETOPT_LINK --- sys/shell/commands/sc_gnrc_netif.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/shell/commands/sc_gnrc_netif.c b/sys/shell/commands/sc_gnrc_netif.c index 95244b5337..f8e21722c6 100644 --- a/sys/shell/commands/sc_gnrc_netif.c +++ b/sys/shell/commands/sc_gnrc_netif.c @@ -494,9 +494,10 @@ static void _netif_list(netif_t *iface) printf(" CR: %s ", _netopt_coding_rate_str[u8]); } #endif - res = netif_get_opt(iface, NETOPT_LINK, 0, &u8, sizeof(u8)); + netopt_enable_t link; + res = netif_get_opt(iface, NETOPT_LINK, 0, &link, sizeof(netopt_enable_t)); if (res >= 0) { - printf(" Link: %s ", (netopt_enable_t)u8 ? "up" : "down" ); + printf(" Link: %s ", (link == NETOPT_ENABLE) ? "up" : "down" ); } line_thresh = _newline(0U, line_thresh); res = netif_get_opt(iface, NETOPT_ADDRESS_LONG, 0, hwaddr, sizeof(hwaddr));