https://git.reactos.org/?p=reactos.git;a=commitdiff;h=90159e1e518483481ff70…
commit 90159e1e518483481ff700ff1456f603090f3008
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sun Jul 12 23:37:50 2020 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed Aug 19 20:36:12 2020 +0200
[CMD] Implement provisional support for the HIGHESTNUMANODENUMBER environment-like
variable.
This variable is available only in Win7+, even if the underlying API
GetNumaHighestNodeNumber() is available in Win2003+
---
base/shell/cmd/cmd.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/base/shell/cmd/cmd.c b/base/shell/cmd/cmd.c
index 1cc0a0663f5..fbc12154d1b 100644
--- a/base/shell/cmd/cmd.c
+++ b/base/shell/cmd/cmd.c
@@ -948,6 +948,17 @@ GetEnvVarOrSpecial(LPCTSTR varName)
_itot(nErrorLevel, ret, 10);
return ret;
}
+#if (NTDDI_VERSION >= NTDDI_WIN7)
+ /* Available in Win7+, even if the underlying API is available in Win2003+ */
+ /* %HIGHESTNUMANODENUMBER% */
+ else if (_tcsicmp(varName, _T("HIGHESTNUMANODENUMBER")) == 0)
+ {
+ ULONG NumaNodeNumber = 0;
+ GetNumaHighestNodeNumber(&NumaNodeNumber);
+ _itot(NumaNodeNumber, ret, 10);
+ return ret;
+ }
+#endif
return NULL;
}