Merge pull request #13752 from gschorcht/sys/shell/fix_gnrc_netif

sys/shell: fix ifconfig command for NETOPT_LINK
This commit is contained in:
Martine Lenders 2020-03-30 09:44:13 +02:00 committed by GitHub
commit 889e8b7cf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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));