https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e196149b7123fb734b01a…
commit e196149b7123fb734b01abf596515c79cdfca2f0
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Sat Nov 16 20:27:04 2019 +0100
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Sat Nov 16 20:29:44 2019 +0100
[IPCONFIG] Display non-zero type records only and improve error messages
---
base/applications/network/ipconfig/ipconfig.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/base/applications/network/ipconfig/ipconfig.c
b/base/applications/network/ipconfig/ipconfig.c
index 1b15e3f5369..c81c6e31ca8 100644
--- a/base/applications/network/ipconfig/ipconfig.c
+++ b/base/applications/network/ipconfig/ipconfig.c
@@ -763,14 +763,18 @@ DisplayDnsRecord(
NULL);
if (Status != ERROR_SUCCESS)
{
-#if 0
- if (wType != 0)
+ if (Status == DNS_ERROR_RCODE_NAME_ERROR)
+ {
+ _tprintf(_T("\t%S\n"), pszName);
+ _tprintf(_T("\t----------------------------------------\n"));
+ _tprintf(_T("\tName does not exist\n\n"));
+ }
+ else if (Status == DNS_INFO_NO_RECORDS)
{
_tprintf(_T("\t%S\n"), pszName);
_tprintf(_T("\t----------------------------------------\n"));
_tprintf(_T("\tNo records of type %hu\n\n"), wType);
}
-#endif
return;
}
@@ -862,7 +866,9 @@ DisplayDns(VOID)
{
pNextEntry = pThisEntry->pNext;
- DisplayDnsRecord(pThisEntry->pszName, pThisEntry->wType1);
+ if (pThisEntry->wType1 != 0)
+ DisplayDnsRecord(pThisEntry->pszName, pThisEntry->wType1);
+
if (pThisEntry->wType2 != 0)
DisplayDnsRecord(pThisEntry->pszName, pThisEntry->wType2);