Commit in reactos on MAIN
lib/kernel32/misc/env.c+29-51.25 -> 1.26
ntoskrnl/ps/process.c+2-21.158 -> 1.159
subsys/system/cmd/ver.c+16-61.5 -> 1.6
+47-13
3 modified files
Set version info to NT 4.0 Build 1381 Service Pack 6 and include ReactOS
version number after Windows version in szCSDVersion

reactos/lib/kernel32/misc
env.c 1.25 -> 1.26
diff -u -r1.25 -r1.26
--- env.c	23 Jan 2004 21:16:03 -0000	1.25
+++ env.c	18 Dec 2004 21:06:25 -0000	1.26
@@ -1,4 +1,4 @@
-/* $Id: env.c,v 1.25 2004/01/23 21:16:03 ekohl Exp $
+/* $Id: env.c,v 1.26 2004/12/18 21:06:25 gvg Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS system libraries
@@ -254,6 +254,7 @@
     )
 {
  PPEB pPeb = NtCurrentPeb();
+ WCHAR *RosVersion;
 
  /* TODO: move this into RtlGetVersion */
  switch(lpVersionInformation->dwOSVersionInfoSize)
@@ -281,12 +282,18 @@
    lpVersionInformation->dwBuildNumber = pPeb->OSBuildNumber;
    lpVersionInformation->dwPlatformId = pPeb->OSPlatformId;
 
-   /* version string is "ReactOS x.y.z" */
+   /* First the Windows compatible string */
+   _snwprintf(lpVersionInformation->szCSDVersion,
+              sizeof(lpVersionInformation->szCSDVersion) / sizeof(WCHAR),
+              L"Service Pack %u", pPeb->SPMajorVersion);
+   /* Add the Reactos-specific string */
+   RosVersion = lpVersionInformation->szCSDVersion + wcslen(lpVersionInformation->szCSDVersion) + 1;
    wcsncpy
    (
-    lpVersionInformation->szCSDVersion,
+    RosVersion,
     L"ReactOS " KERNEL_VERSION_STR L" (Build " KERNEL_VERSION_BUILD_STR L")",
-    sizeof(lpVersionInformation->szCSDVersion) / sizeof(WCHAR)
+    sizeof(lpVersionInformation->szCSDVersion) / sizeof(WCHAR) -
+    ((RosVersion - lpVersionInformation->szCSDVersion) + 1)
    );
 
    /* null-terminate, just in case */
@@ -377,7 +384,24 @@
  ] = 0;
  wstrVerStr.Length = wcslen(wstrVerStr.Buffer) * sizeof(WCHAR);
 
- /* convert the version string */
+ /* convert the win version string */
+ nErrCode = RtlUnicodeStringToAnsiString(&strVerStr, &wstrVerStr, FALSE);
+ 
+ if(!NT_SUCCESS(nErrCode))
+ {
+  /* failure */
+  SetLastErrorByStatus(nErrCode);
+  return FALSE;
+ }
+
+ wstrVerStr.Buffer = oviVerInfo.szCSDVersion + wstrVerStr.Length / sizeof(WCHAR) + 1;
+ wstrVerStr.MaximumLength = sizeof(oviVerInfo.szCSDVersion) - (wstrVerStr.Length + sizeof(WCHAR));
+ wstrVerStr.Length = wcslen(wstrVerStr.Buffer) * sizeof(WCHAR);
+ strVerStr.Buffer = lpVersionInformation->szCSDVersion + strVerStr.Length + 1;
+ strVerStr.MaximumLength = sizeof(lpVersionInformation->szCSDVersion) - (strVerStr.Length + 1);
+ strVerStr.Length = 0;
+
+ /* convert the ReactOS version string */
  nErrCode = RtlUnicodeStringToAnsiString(&strVerStr, &wstrVerStr, FALSE);
  
  if(!NT_SUCCESS(nErrCode))

reactos/ntoskrnl/ps
process.c 1.158 -> 1.159
diff -u -r1.158 -r1.159
--- process.c	5 Dec 2004 15:42:42 -0000	1.158
+++ process.c	18 Dec 2004 21:06:25 -0000	1.159
@@ -1,4 +1,4 @@
-/* $Id: process.c,v 1.158 2004/12/05 15:42:42 weiden Exp $
+/* $Id: process.c,v 1.159 2004/12/18 21:06:25 gvg Exp $
  *
  * COPYRIGHT:         See COPYING in the top level directory
  * PROJECT:           ReactOS kernel
@@ -499,7 +499,7 @@
 
   Peb->OSMajorVersion = 4;
   Peb->OSMinorVersion = 0;
-  Peb->OSBuildNumber = 0;
+  Peb->OSBuildNumber = 1381;
   Peb->OSPlatformId = 2; //VER_PLATFORM_WIN32_NT;
   Peb->SPMajorVersion = 6;
 

reactos/subsys/system/cmd
ver.c 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- ver.c	8 Nov 2004 02:16:06 -0000	1.5
+++ ver.c	18 Dec 2004 21:06:25 -0000	1.6
@@ -27,17 +27,27 @@
 VOID ShortVersion (VOID)
 {
 	OSVERSIONINFO VersionInfo;
+	unsigned RosVersionLen;
+	LPTSTR RosVersion;
 
 	ConOutPuts (_T("\n"
 	               SHELLINFO));
 	VersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
-	if (GetVersionEx(&VersionInfo) && 0 == _tcsnicmp(VersionInfo.szCSDVersion, _T("ReactOS"), 7))
-	{
-		ConOutPrintf(_T("%S running on %s"), SHELLVER, VersionInfo.szCSDVersion);
-	}
-	else
-	{
+#ifdef _UNICODE
 		ConOutPrintf(_T("%S"), SHELLVER);
+#else
+		ConOutPrintf(_T("%s"), SHELLVER);
+#endif /* _UNICODE */
+	memset(VersionInfo.szCSDVersion, 0, sizeof(VersionInfo.szCSDVersion));
+	if (GetVersionEx(&VersionInfo))
+	{
+		RosVersion = VersionInfo.szCSDVersion + _tcslen(VersionInfo.szCSDVersion) + 1;
+		RosVersionLen = sizeof(VersionInfo.szCSDVersion) / sizeof(VersionInfo.szCSDVersion[0]) -
+	                        (RosVersion - VersionInfo.szCSDVersion);
+		if (7 <= RosVersionLen && 0 == _tcsnicmp(RosVersion, _T("ReactOS"), 7))
+		{
+			ConOutPrintf(_T(" running on %s"), RosVersion);
+		}
 	}
 	ConOutPuts (_T("\n"));
 }
CVSspam 0.2.8