mirror of https://github.com/acidanthera/audk.git
Update applications to display correct error for gethostbyaddr and gethostbyname. These APIs use h_errno instead of errno, see documentation at: http://www.linuxhowtos.org/manpages/3p/gethostbyaddr.htm
Signed-off-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12511 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
89bbce116a
commit
f32df6f658
|
@ -75,7 +75,7 @@ main (
|
|||
IpAddress[3] = (UINT8)RemoteAddress[3];
|
||||
pHost = gethostbyaddr ( &IpAddress[0], INADDRSZ, AF_INET );
|
||||
if ( NULL == pHost ) {
|
||||
Print ( L"ERROR - host not found, errno: %d\r\n", errno );
|
||||
Print ( L"ERROR - host not found, h_errno: %d\r\n", h_errno );
|
||||
}
|
||||
else {
|
||||
pIpAddress = (UINT8 *)pHost->h_addr_list[ 0 ];
|
||||
|
|
|
@ -64,7 +64,7 @@ main (
|
|||
//
|
||||
pHost = _gethostbydnsname ( Argv[1], AF_INET );
|
||||
if ( NULL == pHost ) {
|
||||
Print ( L"ERROR - host not found, errno: %d\r\n", errno );
|
||||
Print ( L"ERROR - host not found, h_errno: %d\r\n", h_errno );
|
||||
}
|
||||
else {
|
||||
pIpAddress = (UINT8 *)pHost->h_addr;
|
||||
|
|
|
@ -64,7 +64,7 @@ main (
|
|||
//
|
||||
pHost = gethostbyname ( Argv[1]);
|
||||
if ( NULL == pHost ) {
|
||||
Print ( L"ERROR - host not found, errno: %d\r\n", errno );
|
||||
Print ( L"ERROR - host not found, h_errno: %d\r\n", h_errno );
|
||||
}
|
||||
else {
|
||||
pIpAddress = (UINT8 *)pHost->h_addr;
|
||||
|
|
Loading…
Reference in New Issue