https://git.reactos.org/?p=reactos.git;a=commitdiff;h=eb30050e1b506234f8e2f…
commit eb30050e1b506234f8e2f218d83426da63cb0fe5
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Mon Jul 3 12:28:39 2023 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Mon Jul 3 12:28:39 2023 +0200
[IPCONFIG] Add error messages for Release and Renew and fix magic values
---
base/applications/network/ipconfig/ipconfig.c | 12 ++++++------
base/applications/network/ipconfig/lang/bg-BG.rc | 2 ++
base/applications/network/ipconfig/lang/de-DE.rc | 2 ++
base/applications/network/ipconfig/lang/el-GR.rc | 2 ++
base/applications/network/ipconfig/lang/en-US.rc | 2 ++
base/applications/network/ipconfig/lang/es-ES.rc | 2 ++
base/applications/network/ipconfig/lang/fr-FR.rc | 2 ++
base/applications/network/ipconfig/lang/id-ID.rc | 2 ++
base/applications/network/ipconfig/lang/it-IT.rc | 2 ++
base/applications/network/ipconfig/lang/no-NO.rc | 2 ++
base/applications/network/ipconfig/lang/pl-PL.rc | 2 ++
base/applications/network/ipconfig/lang/ro-RO.rc | 2 ++
base/applications/network/ipconfig/lang/ru-RU.rc | 2 ++
base/applications/network/ipconfig/lang/sk-SK.rc | 2 ++
base/applications/network/ipconfig/lang/sq-AL.rc | 2 ++
base/applications/network/ipconfig/lang/sv-SE.rc | 2 ++
base/applications/network/ipconfig/lang/tr-TR.rc | 2 ++
base/applications/network/ipconfig/lang/uk-UA.rc | 2 ++
base/applications/network/ipconfig/lang/zh-CN.rc | 2 ++
base/applications/network/ipconfig/lang/zh-TW.rc | 2 ++
base/applications/network/ipconfig/resource.h | 2 ++
21 files changed, 46 insertions(+), 6 deletions(-)
diff --git a/base/applications/network/ipconfig/ipconfig.c
b/base/applications/network/ipconfig/ipconfig.c
index 014a87d120c..389026974f7 100644
--- a/base/applications/network/ipconfig/ipconfig.c
+++ b/base/applications/network/ipconfig/ipconfig.c
@@ -457,19 +457,19 @@ PrintNodeType(
{
switch (NodeType)
{
- case 1:
+ case BROADCAST_NODETYPE:
ConResPrintf(StdOut, IDS_NODETYPEBCAST);
break;
- case 2:
+ case PEER_TO_PEER_NODETYPE:
ConResPrintf(StdOut, IDS_NODETYPEP2P);
break;
- case 4:
+ case MIXED_NODETYPE:
ConResPrintf(StdOut, IDS_NODETYPEMIXED);
break;
- case 8:
+ case HYBRID_NODETYPE:
ConResPrintf(StdOut, IDS_NODETYPEHYBRID);
break;
@@ -890,7 +890,7 @@ Release(
ret = IpReleaseAddress(&AdapterMap);
if (ret != NO_ERROR)
{
- _tprintf(_T("\nAn error occured while releasing
interface %ls : \n"), szFriendlyName);
+ ConResPrintf(StdOut, IDS_DHCPRELEASEERROR, szFriendlyName);
DoFormatMessage(ret);
}
}
@@ -988,7 +988,7 @@ Renew(
ret = IpRenewAddress(&AdapterMap);
if (ret != NO_ERROR)
{
- _tprintf(_T("\nAn error occured while renew interface %ls :
"), szFriendlyName);
+ ConResPrintf(StdOut, IDS_DHCPRENEWERROR, szFriendlyName);
DoFormatMessage(ret);
}
}
diff --git a/base/applications/network/ipconfig/lang/bg-BG.rc
b/base/applications/network/ipconfig/lang/bg-BG.rc
index 505d454725f..d50fc62f278 100644
--- a/base/applications/network/ipconfig/lang/bg-BG.rc
+++ b/base/applications/network/ipconfig/lang/bg-BG.rc
@@ -89,6 +89,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state
permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been
released.\n"
+ IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls:
"
+ IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls:
"
END
STRINGTABLE
diff --git a/base/applications/network/ipconfig/lang/de-DE.rc
b/base/applications/network/ipconfig/lang/de-DE.rc
index 76313151a15..4737823e579 100644
--- a/base/applications/network/ipconfig/lang/de-DE.rc
+++ b/base/applications/network/ipconfig/lang/de-DE.rc
@@ -91,6 +91,8 @@ BEGIN
IDS_DHCPNOTENABLED "Der Adapter %ls ist nicht für DHCP aktiviert.\n"
IDS_DHCPNOADAPTER "Der Vorgang ist fehlgeschlagen, weil kein Adapter sich
in einem für diesen\nVorgang zulässigen Zustand befindet.\n"
IDS_DHCPRELEASED "Die IP-Adresse für den Adapter %ls wurde bereits
freigegeben.\n"
+ IDS_DHCPRELEASEERROR "Beim Freigeben der Schnittstellen %ls ist folgender
Fehler aufgetreten: "
+ IDS_DHCPRENEWERROR "Beim Aktualisieren der Schnittstelle %ls ist folgender
Fehler aufgetreten: "
END
STRINGTABLE
diff --git a/base/applications/network/ipconfig/lang/el-GR.rc
b/base/applications/network/ipconfig/lang/el-GR.rc
index 77d3ab06a5d..0e739f436e6 100644
--- a/base/applications/network/ipconfig/lang/el-GR.rc
+++ b/base/applications/network/ipconfig/lang/el-GR.rc
@@ -89,6 +89,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state
permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been
released.\n"
+ IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls:
"
+ IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls:
"
END
STRINGTABLE
diff --git a/base/applications/network/ipconfig/lang/en-US.rc
b/base/applications/network/ipconfig/lang/en-US.rc
index d7d5b2ee05e..11baf3a89b8 100644
--- a/base/applications/network/ipconfig/lang/en-US.rc
+++ b/base/applications/network/ipconfig/lang/en-US.rc
@@ -89,6 +89,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state
permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been
released.\n"
+ IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls:
"
+ IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls:
"
END
STRINGTABLE
diff --git a/base/applications/network/ipconfig/lang/es-ES.rc
b/base/applications/network/ipconfig/lang/es-ES.rc
index 6049a922906..0416780ca56 100644
--- a/base/applications/network/ipconfig/lang/es-ES.rc
+++ b/base/applications/network/ipconfig/lang/es-ES.rc
@@ -90,6 +90,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state
permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been
released.\n"
+ IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls:
"
+ IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls:
"
END
STRINGTABLE
diff --git a/base/applications/network/ipconfig/lang/fr-FR.rc
b/base/applications/network/ipconfig/lang/fr-FR.rc
index d0f212dcdb1..3b7e36005e1 100644
--- a/base/applications/network/ipconfig/lang/fr-FR.rc
+++ b/base/applications/network/ipconfig/lang/fr-FR.rc
@@ -91,6 +91,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state
permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been
released.\n"
+ IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls:
"
+ IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls:
"
END
STRINGTABLE
diff --git a/base/applications/network/ipconfig/lang/id-ID.rc
b/base/applications/network/ipconfig/lang/id-ID.rc
index f1230c23632..d7a6149a853 100644
--- a/base/applications/network/ipconfig/lang/id-ID.rc
+++ b/base/applications/network/ipconfig/lang/id-ID.rc
@@ -89,6 +89,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state
permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been
released.\n"
+ IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls:
"
+ IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls:
"
END
STRINGTABLE
diff --git a/base/applications/network/ipconfig/lang/it-IT.rc
b/base/applications/network/ipconfig/lang/it-IT.rc
index c0dfa9e3913..f96e1488573 100644
--- a/base/applications/network/ipconfig/lang/it-IT.rc
+++ b/base/applications/network/ipconfig/lang/it-IT.rc
@@ -89,6 +89,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state
permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been
released.\n"
+ IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls:
"
+ IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls:
"
END
STRINGTABLE
diff --git a/base/applications/network/ipconfig/lang/no-NO.rc
b/base/applications/network/ipconfig/lang/no-NO.rc
index e710a25f57f..6c08063cf40 100644
--- a/base/applications/network/ipconfig/lang/no-NO.rc
+++ b/base/applications/network/ipconfig/lang/no-NO.rc
@@ -89,6 +89,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state
permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been
released.\n"
+ IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls:
"
+ IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls:
"
END
STRINGTABLE
diff --git a/base/applications/network/ipconfig/lang/pl-PL.rc
b/base/applications/network/ipconfig/lang/pl-PL.rc
index 5860ea06fa8..b81bad80b0c 100644
--- a/base/applications/network/ipconfig/lang/pl-PL.rc
+++ b/base/applications/network/ipconfig/lang/pl-PL.rc
@@ -68,6 +68,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state
permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been
released.\n"
+ IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls:
"
+ IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls:
"
END
STRINGTABLE
diff --git a/base/applications/network/ipconfig/lang/ro-RO.rc
b/base/applications/network/ipconfig/lang/ro-RO.rc
index bc24294c3d3..bfdb06b9a8f 100644
--- a/base/applications/network/ipconfig/lang/ro-RO.rc
+++ b/base/applications/network/ipconfig/lang/ro-RO.rc
@@ -90,6 +90,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state
permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been
released.\n"
+ IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls:
"
+ IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls:
"
END
STRINGTABLE
diff --git a/base/applications/network/ipconfig/lang/ru-RU.rc
b/base/applications/network/ipconfig/lang/ru-RU.rc
index c365b1d37f3..7aed1e5210b 100644
--- a/base/applications/network/ipconfig/lang/ru-RU.rc
+++ b/base/applications/network/ipconfig/lang/ru-RU.rc
@@ -90,6 +90,8 @@ BEGIN
IDS_DHCPNOTENABLED "Адаптер ""%ls"" не доступен для
DHCP.\n"
IDS_DHCPNOADAPTER "Операция завершена с ошибкой, поскольку ни один
адаптер\nне находился в состоянии, допустимом для её выполнения.\n"
IDS_DHCPRELEASED "IP-адрес для адаптера ""%ls"" уже
освобождён.\n"
+ IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls:
"
+ IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls:
"
END
STRINGTABLE
diff --git a/base/applications/network/ipconfig/lang/sk-SK.rc
b/base/applications/network/ipconfig/lang/sk-SK.rc
index 71bd81648c6..8335eeb2fb9 100644
--- a/base/applications/network/ipconfig/lang/sk-SK.rc
+++ b/base/applications/network/ipconfig/lang/sk-SK.rc
@@ -89,6 +89,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state
permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been
released.\n"
+ IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls:
"
+ IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls:
"
END
STRINGTABLE
diff --git a/base/applications/network/ipconfig/lang/sq-AL.rc
b/base/applications/network/ipconfig/lang/sq-AL.rc
index 8dc5e361839..120fcf45f72 100644
--- a/base/applications/network/ipconfig/lang/sq-AL.rc
+++ b/base/applications/network/ipconfig/lang/sq-AL.rc
@@ -89,6 +89,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state
permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been
released.\n"
+ IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls:
"
+ IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls:
"
END
STRINGTABLE
diff --git a/base/applications/network/ipconfig/lang/sv-SE.rc
b/base/applications/network/ipconfig/lang/sv-SE.rc
index 24eea34eb75..8f0cd22fdb2 100644
--- a/base/applications/network/ipconfig/lang/sv-SE.rc
+++ b/base/applications/network/ipconfig/lang/sv-SE.rc
@@ -90,6 +90,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state
permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been
released.\n"
+ IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls:
"
+ IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls:
"
END
STRINGTABLE
diff --git a/base/applications/network/ipconfig/lang/tr-TR.rc
b/base/applications/network/ipconfig/lang/tr-TR.rc
index dfc2a5fec83..c720a6eb0c4 100644
--- a/base/applications/network/ipconfig/lang/tr-TR.rc
+++ b/base/applications/network/ipconfig/lang/tr-TR.rc
@@ -90,6 +90,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state
permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been
released.\n"
+ IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls:
"
+ IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls:
"
END
STRINGTABLE
diff --git a/base/applications/network/ipconfig/lang/uk-UA.rc
b/base/applications/network/ipconfig/lang/uk-UA.rc
index 63b33b1fe34..c94ffdb188b 100644
--- a/base/applications/network/ipconfig/lang/uk-UA.rc
+++ b/base/applications/network/ipconfig/lang/uk-UA.rc
@@ -90,6 +90,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state
permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been
released.\n"
+ IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls:
"
+ IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls:
"
END
STRINGTABLE
diff --git a/base/applications/network/ipconfig/lang/zh-CN.rc
b/base/applications/network/ipconfig/lang/zh-CN.rc
index 588851408bc..76b031627ba 100644
--- a/base/applications/network/ipconfig/lang/zh-CN.rc
+++ b/base/applications/network/ipconfig/lang/zh-CN.rc
@@ -90,6 +90,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state
permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been
released.\n"
+ IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls:
"
+ IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls:
"
END
STRINGTABLE
diff --git a/base/applications/network/ipconfig/lang/zh-TW.rc
b/base/applications/network/ipconfig/lang/zh-TW.rc
index 17272ed578f..0e1063ad894 100644
--- a/base/applications/network/ipconfig/lang/zh-TW.rc
+++ b/base/applications/network/ipconfig/lang/zh-TW.rc
@@ -90,6 +90,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state
permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been
released.\n"
+ IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls:
"
+ IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls:
"
END
STRINGTABLE
diff --git a/base/applications/network/ipconfig/resource.h
b/base/applications/network/ipconfig/resource.h
index 0395027b423..678e677f084 100644
--- a/base/applications/network/ipconfig/resource.h
+++ b/base/applications/network/ipconfig/resource.h
@@ -75,3 +75,5 @@
#define IDS_DHCPNOTENABLED 205
#define IDS_DHCPNOADAPTER 206
#define IDS_DHCPRELEASED 207
+#define IDS_DHCPRELEASEERROR 208
+#define IDS_DHCPRENEWERROR 209