]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update applications to display correct error for gethostbyaddr and gethostbyname...
authorlpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 4 Oct 2011 18:31:40 +0000 (18:31 +0000)
committerlpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 4 Oct 2011 18:31:40 +0000 (18:31 +0000)
Signed-off-by: lpleahy
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12511 6f19259b-4bc3-4df7-8a09-765794883524

AppPkg/Applications/Sockets/GetHostByAddr/GetHostByAddr.c
AppPkg/Applications/Sockets/GetHostByDns/GetHostByDns.c
AppPkg/Applications/Sockets/GetHostByName/GetHostByName.c

index 63299a1f9d5d28390979bb83c16595b1a24aa503..cec6b6c7c9af2e0b573c2de94191ad192ef64d1a 100644 (file)
@@ -75,7 +75,7 @@ main (
     IpAddress[3] = (UINT8)RemoteAddress[3];\r
     pHost = gethostbyaddr ( &IpAddress[0], INADDRSZ, AF_INET );\r
     if ( NULL == pHost ) {\r
     IpAddress[3] = (UINT8)RemoteAddress[3];\r
     pHost = gethostbyaddr ( &IpAddress[0], INADDRSZ, AF_INET );\r
     if ( NULL == pHost ) {\r
-      Print ( L"ERROR - host not found, errno: %d\r\n", errno );\r
+      Print ( L"ERROR - host not found, h_errno: %d\r\n", h_errno );\r
     }\r
     else {\r
       pIpAddress = (UINT8 *)pHost->h_addr_list[ 0 ];\r
     }\r
     else {\r
       pIpAddress = (UINT8 *)pHost->h_addr_list[ 0 ];\r
index c5c78ac2b3813974b0e57d066fd72121a7bae881..a9aa183e40c540d53a1c441b82e9979b93cf106b 100644 (file)
@@ -64,7 +64,7 @@ main (
     //\r
     pHost = _gethostbydnsname ( Argv[1], AF_INET );\r
     if ( NULL == pHost ) {\r
     //\r
     pHost = _gethostbydnsname ( Argv[1], AF_INET );\r
     if ( NULL == pHost ) {\r
-      Print ( L"ERROR - host not found, errno: %d\r\n", errno );\r
+      Print ( L"ERROR - host not found, h_errno: %d\r\n", h_errno );\r
     }\r
     else {\r
       pIpAddress = (UINT8 *)pHost->h_addr;\r
     }\r
     else {\r
       pIpAddress = (UINT8 *)pHost->h_addr;\r
index c58552abbc55e05ff02140a366525a58cbfe8135..f81ca96af05436654f70c1437ffe69b86834c4aa 100644 (file)
@@ -64,7 +64,7 @@ main (
     //\r
     pHost = gethostbyname ( Argv[1]);\r
     if ( NULL == pHost ) {\r
     //\r
     pHost = gethostbyname ( Argv[1]);\r
     if ( NULL == pHost ) {\r
-      Print ( L"ERROR - host not found, errno: %d\r\n", errno );\r
+      Print ( L"ERROR - host not found, h_errno: %d\r\n", h_errno );\r
     }\r
     else {\r
       pIpAddress = (UINT8 *)pHost->h_addr;\r
     }\r
     else {\r
       pIpAddress = (UINT8 *)pHost->h_addr;\r