mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-20 04:26:04 +08:00
netlib_getarptab.c: improved the display without any arp entry
before: server> arp ERROR: send() failed: 2 nsh: arp: S��x�����Ì failed: 2 server> after: server> arp IP Address Ethernet Address Interface server> Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
@@ -153,8 +153,12 @@ ssize_t netlib_get_arptable(FAR struct arpreq *arptab,
|
|||||||
if (nsent < 0)
|
if (nsent < 0)
|
||||||
{
|
{
|
||||||
int errcode = errno;
|
int errcode = errno;
|
||||||
|
if (errcode != ENOENT)
|
||||||
|
{
|
||||||
fprintf(stderr, "ERROR: send() failed: %d\n", errcode);
|
fprintf(stderr, "ERROR: send() failed: %d\n", errcode);
|
||||||
ret = -errcode;
|
ret = -errcode;
|
||||||
|
}
|
||||||
|
|
||||||
goto errout_with_socket;
|
goto errout_with_socket;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user