NSH: Improve an error message
This commit is contained in:
parent
3df8b716dc
commit
b54aa2b081
@ -314,7 +314,7 @@ o arp [-a <ipaddr>|-d <ipaddr>|-s <ipaddr> <hwaddr>]
|
||||
Example:
|
||||
|
||||
nsh> arp -a 10.0.0.1
|
||||
nsh: arp: ioctl failed: 22
|
||||
nsh: arp: no such ARP entry: 10.0.0.1
|
||||
|
||||
nsh> arp -s 10.0.0.1 00:13:3b:12:73:e6
|
||||
nsh> arp -a 10.0.0.1
|
||||
@ -322,7 +322,7 @@ o arp [-a <ipaddr>|-d <ipaddr>|-s <ipaddr> <hwaddr>]
|
||||
|
||||
nsh> arp -d 10.0.0.1
|
||||
nsh> arp -a 10.0.0.1
|
||||
nsh: arp: ioctl failed: 22
|
||||
nsh: arp: no such ARP entry: 10.0.0.1
|
||||
|
||||
o base64dec [-w] [-f] <string or filepath>
|
||||
|
||||
|
@ -1254,7 +1254,15 @@ int cmd_arp(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||
/* Error exits */
|
||||
|
||||
errout_cmdfaild:
|
||||
nsh_output(vtbl, g_fmtcmdfailed, argv[0], "ioctl", NSH_ERRNO);
|
||||
if (ret == -ENOENT)
|
||||
{
|
||||
nsh_output(vtbl, g_fmtnosuch, argv[0], "ARP entry", argv[2]);
|
||||
}
|
||||
else
|
||||
{
|
||||
nsh_output(vtbl, g_fmtcmdfailed, argv[0], "ioctl", NSH_ERRNO);
|
||||
}
|
||||
|
||||
return ERROR;
|
||||
|
||||
errout_missing:
|
||||
|
Loading…
Reference in New Issue
Block a user