diff options
author | lpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-04 18:31:40 +0000 |
---|---|---|
committer | lpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-04 18:31:40 +0000 |
commit | f32df6f658ab29a3c5d0104fc3db8849e6998762 (patch) | |
tree | aca72fd299dfac64eb1019d810a3c1261da6a186 | |
parent | 89bbce116a4dabb83c1be5953b030928f2d2f378 (diff) | |
download | edk2-f32df6f658ab29a3c5d0104fc3db8849e6998762.tar.gz edk2-f32df6f658ab29a3c5d0104fc3db8849e6998762.tar.bz2 edk2-f32df6f658ab29a3c5d0104fc3db8849e6998762.zip |
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
3 files changed, 3 insertions, 3 deletions
diff --git a/AppPkg/Applications/Sockets/GetHostByAddr/GetHostByAddr.c b/AppPkg/Applications/Sockets/GetHostByAddr/GetHostByAddr.c index 63299a1f9d..cec6b6c7c9 100644 --- a/AppPkg/Applications/Sockets/GetHostByAddr/GetHostByAddr.c +++ b/AppPkg/Applications/Sockets/GetHostByAddr/GetHostByAddr.c @@ -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 ];
diff --git a/AppPkg/Applications/Sockets/GetHostByDns/GetHostByDns.c b/AppPkg/Applications/Sockets/GetHostByDns/GetHostByDns.c index c5c78ac2b3..a9aa183e40 100644 --- a/AppPkg/Applications/Sockets/GetHostByDns/GetHostByDns.c +++ b/AppPkg/Applications/Sockets/GetHostByDns/GetHostByDns.c @@ -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;
diff --git a/AppPkg/Applications/Sockets/GetHostByName/GetHostByName.c b/AppPkg/Applications/Sockets/GetHostByName/GetHostByName.c index c58552abbc..f81ca96af0 100644 --- a/AppPkg/Applications/Sockets/GetHostByName/GetHostByName.c +++ b/AppPkg/Applications/Sockets/GetHostByName/GetHostByName.c @@ -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;
|