ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
May 2005
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
26 participants
814 discussions
Start a n
N
ew thread
[hpoussin] 15480: Write keyboard identifier in right registry key
by hpoussin@svn.reactos.com
Write keyboard identifier in right registry key Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c _____ Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c --- trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c 2005-05-23 19:17:36 UTC (rev 15479) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c 2005-05-23 19:30:22 UTC (rev 15480) @@ -1715,7 +1715,7 @@ /* Set 'Identifier' value */ strcpy(Buffer, "PCAT_ENHANCED"); - Error = RegSetValue(ControllerKey, + Error = RegSetValue(PeripheralKey, "Identifier", REG_SZ, Buffer,
19 years, 7 months
1
0
0
0
[jimtabor] 15479: I give up! I fix the rest of the headers later.
by jimtabor@svn.reactos.com
I give up! I fix the rest of the headers later. Modified: trunk/reactos/apps/utils/ps/ps.c _____ Modified: trunk/reactos/apps/utils/ps/ps.c --- trunk/reactos/apps/utils/ps/ps.c 2005-05-23 18:59:21 UTC (rev 15478) +++ trunk/reactos/apps/utils/ps/ps.c 2005-05-23 19:17:36 UTC (rev 15479) @@ -1,4 +1,4 @@ -/* $Id$ +/* * * ReactOS ps - process list console viewer * @@ -23,9 +23,71 @@ */ #include <windows.h> -#include <ddk/ntapi.h> +/* NOTE: W32API ddk/ntapi.h header has wrong definition of SYSTEM_PROCESSES. */ +#include <ntos/types.h> +typedef struct _SYSTEM_THREADS + { + LARGE_INTEGER KernelTime; + LARGE_INTEGER UserTime; + LARGE_INTEGER CreateTime; + ULONG WaitTime; + PVOID StartAddress; + CLIENT_ID ClientId; + KPRIORITY Priority; + LONG BasePriority; + ULONG ContextSwitches; + ULONG ThreadState; + ULONG WaitReason; + } SYSTEM_THREADS, *PSYSTEM_THREADS; + + typedef struct _SYSTEM_PROCESSES + { + ULONG NextEntryOffset; + ULONG NumberOfThreads; + LARGE_INTEGER SpareLi1; + LARGE_INTEGER SpareLi2; + LARGE_INTEGER SpareLi3; + LARGE_INTEGER CreateTime; + LARGE_INTEGER UserTime; + LARGE_INTEGER KernelTime; + UNICODE_STRING ImageName; + KPRIORITY BasePriority; + HANDLE UniqueProcessId; + HANDLE InheritedFromUniqueProcessId; + ULONG HandleCount; + ULONG SessionId; + ULONG PageDirectoryFrame; + /* + * This part corresponds to VM_COUNTERS_EX. + * NOTE: *NOT* THE SAME AS VM_COUNTERS! + */ + ULONG PeakVirtualSize; + ULONG VirtualSize; + ULONG PageFaultCount; + ULONG PeakWorkingSetSize; + ULONG WorkingSetSize; + ULONG QuotaPeakPagedPoolUsage; + ULONG QuotaPagedPoolUsage; + ULONG QuotaPeakNonPagedPoolUsage; + ULONG QuotaNonPagedPoolUsage; + ULONG PagefileUsage; + ULONG PeakPagefileUsage; + ULONG PrivateUsage; + + /* This part corresponds to IO_COUNTERS */ + LARGE_INTEGER ReadOperationCount; + LARGE_INTEGER WriteOperationCount; + LARGE_INTEGER OtherOperationCount; + LARGE_INTEGER ReadTransferCount; + LARGE_INTEGER WriteTransferCount; + LARGE_INTEGER OtherTransferCount; + + SYSTEM_THREADS Threads [1]; + } SYSTEM_PROCESSES, *PSYSTEM_PROCESSES; + + // x00000000 00000000 000:00:00 000:00:00 () static char* title = "P PID PPID KTime UTime NAME\n"; static char* title1 = "t TID KTime UTime State WaitResson\n"; @@ -35,7 +97,7 @@ struct status { DWORD state; char desc[10]; -} thread_stat[8 + 1] = { +} thread_stat[8 + 1] = { {0, "Init "}, {1, "Ready "}, {2, "Running "}, @@ -47,7 +109,6 @@ {-1," ? "} }; - struct waitres { DWORD state; char desc[17]; @@ -89,7 +150,6 @@ {34,"MaximumWaitReason"}, {-1," ? "} }; - BOOL CALLBACK EnumThreadProc(HWND hwnd, LPARAM lp) { @@ -97,9 +157,9 @@ LONG style; HANDLE stdout = GetStdHandle(STD_OUTPUT_HANDLE); char buf[256]; - + GetWindowText(hwnd, (LPTSTR)lp, 30); - + if(hwnd != 0) { style = GetWindowLong(hwnd, GWL_STYLE); @@ -117,13 +177,13 @@ DWORD r; ANSI_STRING astring; HANDLE stdout = GetStdHandle(STD_OUTPUT_HANDLE); - PSYSTEM_PROCESS_INFORMATION SystemProcesses = NULL; - PSYSTEM_PROCESS_INFORMATION CurrentProcess; + PSYSTEM_PROCESSES SystemProcesses = NULL; + PSYSTEM_PROCESSES CurrentProcess; ULONG BufferSize, ReturnSize; NTSTATUS Status; char buf[256]; char buf1[256]; - + WriteFile(stdout, title, lstrlen(title), &r, NULL); WriteFile(stdout, title1, lstrlen(title1), &r, NULL); WriteFile(stdout, title2, lstrlen(title2), &r, NULL); @@ -160,7 +220,7 @@ hour = (ptime.QuadPart / (10000000LL * 3600LL)); minute = (ptime.QuadPart / (10000000LL * 60LL)) % 60LL; seconds = (ptime.QuadPart / 10000000LL) % 60LL; - + ptime.QuadPart = CurrentProcess->UserTime.QuadPart; hour1 = (ptime.QuadPart / (10000000LL * 3600LL)); minute1 = (ptime.QuadPart / (10000000LL * 60LL)) % 60LL; @@ -173,7 +233,7 @@ hour, minute, seconds, hour1, minute1, seconds1, astring.Buffer); WriteFile(stdout, buf, lstrlen(buf), &r, NULL); - + RtlFreeAnsiString(&astring); for (ti = 0; ti < CurrentProcess->NumberOfThreads; ti++) @@ -182,37 +242,37 @@ struct waitres *waitt; char szWindowName[30] = {" "}; - ptime = CurrentProcess->TH[ti].KernelTime; + ptime = CurrentProcess->Threads[ti].KernelTime; thour = (ptime.QuadPart / (10000000LL * 3600LL)); tmin = (ptime.QuadPart / (10000000LL * 60LL)) % 60LL; tsec = (ptime.QuadPart / 10000000LL) % 60LL; - ptime = CurrentProcess->TH[ti].UserTime; + ptime = CurrentProcess->Threads[ti].UserTime; thour1 = (ptime.QuadPart / (10000000LL * 3600LL)); tmin1 = (ptime.QuadPart / (10000000LL * 60LL)) % 60LL; tsec1 = (ptime.QuadPart / 10000000LL) % 60LL; statt = thread_stat; - while (statt->state != CurrentProcess->TH[ti].ThreadState && statt->state >= 0) + while (statt->state != CurrentProcess->Threads[ti].ThreadState && statt->state >= 0) statt++; waitt = waitreason; - while (waitt->state != CurrentProcess->TH[ti].WaitReason && waitt->state >= 0) + while (waitt->state != CurrentProcess->Threads[ti].WaitReason && waitt->state >= 0) waitt++; - wsprintf (buf1, + wsprintf (buf1, "t% %8d %3d:%02d:%02d %3d:%02d:%02d %s %s\n", - CurrentProcess->TH[ti].ClientId.UniqueThread, + CurrentProcess->Threads[ti].ClientId.UniqueThread, thour, tmin, tsec, thour1, tmin1, tsec1, statt->desc , waitt->desc); WriteFile(stdout, buf1, lstrlen(buf1), &r, NULL); - EnumThreadWindows((DWORD)CurrentProcess->TH[ti].ClientId.UniqueThread, + EnumThreadWindows((DWORD)CurrentProcess->Threads[ti].ClientId.UniqueThre ad, (ENUMWINDOWSPROC) EnumThreadProc, (LPARAM)(LPTSTR) szWindowName ); } - CurrentProcess = (PSYSTEM_PROCESS_INFORMATION)((ULONG_PTR)CurrentProcess + + CurrentProcess = (PSYSTEM_PROCESSES)((ULONG_PTR)CurrentProcess + CurrentProcess->NextEntryOffset); - } + } return (0); }
19 years, 7 months
1
0
0
0
[jimtabor] 15478: Fixup sysinfo.c SystemProcessInfo header.
by jimtabor@svn.reactos.com
Fixup sysinfo.c SystemProcessInfo header. Modified: trunk/reactos/include/ntos/zwtypes.h _____ Modified: trunk/reactos/include/ntos/zwtypes.h --- trunk/reactos/include/ntos/zwtypes.h 2005-05-23 17:13:23 UTC (rev 15477) +++ trunk/reactos/include/ntos/zwtypes.h 2005-05-23 18:59:21 UTC (rev 15478) @@ -326,7 +326,7 @@ ULONG SystemCalls; } SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION; -#ifndef __USE_W32API +/*#ifndef __USE_W32API*/ // SystemProcessThreadInfo (5) typedef struct _SYSTEM_THREAD_INFORMATION @@ -391,7 +391,7 @@ SYSTEM_THREAD_INFORMATION TH[1]; } SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION; -#endif +/*#endif */ // SystemModuleInformation (11) typedef struct _SYSTEM_MODULE_INFORMATION_ENTRY {
19 years, 7 months
1
0
0
0
[jimtabor] 15477: Update include header and update waitreason list.
by jimtabor@svn.reactos.com
Update include header and update waitreason list. Modified: trunk/reactos/apps/utils/ps/ps.c _____ Modified: trunk/reactos/apps/utils/ps/ps.c --- trunk/reactos/apps/utils/ps/ps.c 2005-05-23 16:48:22 UTC (rev 15476) +++ trunk/reactos/apps/utils/ps/ps.c 2005-05-23 17:13:23 UTC (rev 15477) @@ -23,8 +23,7 @@ */ #include <windows.h> -/* NOTE: W32API ddk/ntapi.h header has wrong definition of SYSTEM_PROCESSES. */ -#include <ntos/types.h> +#include <ddk/ntapi.h> // x00000000 00000000 000:00:00 000:00:00 () @@ -48,39 +47,47 @@ {-1," ? "} }; + struct waitres { DWORD state; - char desc[11]; -} waitreason[28 + 1] = { - {0, "Executive "}, - {1, "FreePage "}, - {2, "PageIn "}, - {3, "PoolAlloc "}, - {4, "DelayExec "}, - {5, "Suspended "}, - {6, "UserReq "}, - {7, "WrExecutive"}, - {8, "WrFreePage "}, - {9, "WrPageIn "}, - {10,"WrPoolAlloc"}, - {11,"WrDelayExec"}, - {12,"WrSuspended"}, - {13,"WrUserReq "}, - {14,"WrEventPair"}, - {15,"WrQueue "}, - {16,"WrLpcRec "}, - {17,"WrLpcReply "}, - {18,"WrVirtualMm"}, - {19,"WrPageOut "}, - {20,"WrRendez "}, - {21,"Spare1 "}, - {22,"Spare2 "}, - {23,"Spare3 "}, - {24,"Spare4 "}, - {25,"Spare5 "}, - {26,"Spare6 "}, - {27,"WrKernel "}, - {-1," ? "} + char desc[17]; +} waitreason[35 + 1] = { + {0, "Executive "}, + {1, "FreePage "}, + {2, "PageIn "}, + {3, "PoolAllocation "}, + {4, "DelayExecution "}, + {5, "Suspended "}, + {6, "UserRequest "}, + {7, "WrExecutive "}, + {8, "WrFreePage "}, + {9, "WrPageIn "}, + {10,"WrPoolAllocation "}, + {11,"WrDelayExecution "}, + {12,"WrSuspended "}, + {13,"WrUserRequest "}, + {14,"WrEventPair "}, + {15,"WrQueue "}, + {16,"WrLpcReceive "}, + {17,"WrLpcReply "}, + {18,"WrVirtualMemory "}, + {19,"WrPageOut "}, + {20,"WrRendezvous "}, + {21,"Spare2 "}, + {22,"WrGuardedMutex "}, + {23,"Spare4 "}, + {24,"Spare5 "}, + {25,"Spare6 "}, + {26,"WrKernel "}, + {27,"WrResource "}, + {28,"WrPushLock "}, + {29,"WrMutex "}, + {30,"WrQuantumEnd "}, + {31,"WrDispatchInt "}, + {32,"WrPreempted "}, + {33,"WrYieldExecution "}, + {34,"MaximumWaitReason"}, + {-1," ? "} }; BOOL CALLBACK
19 years, 7 months
1
0
0
0
[greatlrd] 15476: 1. remove all hardcode strings to En.rc
by greatlrd@svn.reactos.com
1. remove all hardcode strings to En.rc 2. make it unicode and anis Added: trunk/reactos/subsys/system/sm/En.rc Added: trunk/reactos/subsys/system/sm/resource.h Modified: trunk/reactos/subsys/system/sm/sm.c Modified: trunk/reactos/subsys/system/sm/sm.rc _____ Added: trunk/reactos/subsys/system/sm/En.rc --- trunk/reactos/subsys/system/sm/En.rc 2005-05-23 08:50:29 UTC (rev 15475) +++ trunk/reactos/subsys/system/sm/En.rc 2005-05-23 16:48:22 UTC (rev 15476) @@ -0,0 +1,57 @@ +#include "resource.h" +/* + * Moved all hardcoded strings to En.rc. + * By Magnus Olsen 2005 magnus(a)itkonsult-olsen.com + */ + +LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT +STRINGTABLE DISCARDABLE +{ +IDS_boot, "boot subsystem_name" + +IDS_help, "help [command]" + +IDS_info, "info [subsystem_id]" + +IDS_reboot, "reboot subsystem_id" + +IDS_shutdown,"shutdown subsystem_id" + + + +IDS_boot_msg, "bootstrap an optional environment subsystem;" + +IDS_help_msg, "print help for command;" + +IDS_info_msg, "print information about a booted subsystem\n\ +if subsystem_id is omitted, a list of booted\n\ +environment subsystems is printed." + +IDS_reboot_msg, "reboot an optional environment subsystem;" +IDS_shutdown_msg, "shutdown an optional environment subsystem;" + +IDS_Unknown, "Unknown command '%s'.\n" + +IDS_Status, "Status 0x%08lx\n" + +IDS_SM1, "SM SubSystem Directory\n\n\ +SSID PID Flags\n\ +---- -------- ------------\n" + +IDS_SM2, "%04x %08lx %04x\n" + +IDS_ID, "SubSystem ID: %d\n\ + Flags: %04x\n\ + Process ID: %ld\n" + +IDS_Not_Imp, "not implemented\n" + +IDS_Mangers, "ReactOS/Win32 Session Manager Control Tool\n\n" + +IDS_USING, "Usage:\n\ +\tsm\n\ +\tsm help [command]\n\ +\tsm command [arguments]\n\n'sm help' will print the list of valid commands.\n" + +IDS_FAILS_MNG, "Failed to connect to the Session Manager! (Status=0x%08lx)\n" +} _____ Added: trunk/reactos/subsys/system/sm/resource.h --- trunk/reactos/subsys/system/sm/resource.h 2005-05-23 08:50:29 UTC (rev 15475) +++ trunk/reactos/subsys/system/sm/resource.h 2005-05-23 16:48:22 UTC (rev 15476) @@ -0,0 +1,27 @@ + + + +#define RC_STRING_MAX_SIZE 200 +#define IDS_boot 100 +#define IDS_help 101 +#define IDS_info 102 +#define IDS_reboot 103 +#define IDS_shutdown 104 +#define IDS_boot_msg 205 +#define IDS_help_msg 206 +#define IDS_info_msg 207 +#define IDS_reboot_msg 208 +#define IDS_shutdown_msg 209 + +#define IDS_Unknown 300 +#define IDS_Not_Imp 301 +#define IDS_ID 302 +#define IDS_SM2 303 +#define IDS_SM1 304 +#define IDS_Status 305 +#define IDS_Mangers 306 +#define IDS_USING 307 +#define IDS_FAILS_MNG 308 + + +/* EOF */ _____ Modified: trunk/reactos/subsys/system/sm/sm.c --- trunk/reactos/subsys/system/sm/sm.c 2005-05-23 08:50:29 UTC (rev 15475) +++ trunk/reactos/subsys/system/sm/sm.c 2005-05-23 16:48:22 UTC (rev 15476) @@ -26,6 +26,8 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <tchar.h> +#include "resource.h" #define NTOS_MODE_USER #include <ntos.h> @@ -39,10 +41,10 @@ typedef struct _SM_CMD_DESCRIPTOR { - const char * Name; - int (*EntryPoint)(int,char**); - const char * Synopsis; - const char * Description; + TCHAR Name[RC_STRING_MAX_SIZE]; + int (*EntryPoint)(int,TCHAR**); + TCHAR Synopsis[RC_STRING_MAX_SIZE]; + TCHAR Description[RC_STRING_MAX_SIZE]; } SM_CMD_DESCRIPTOR, *PSM_CMD_DESCRIPTOR; @@ -55,16 +57,19 @@ /* internal commands directory */ SM_CMD_DESCRIPTOR Command [] = { - {"boot", SM_CMD(boot), "boot subsystem_name", "bootstrap an optional environment subsystem;"}, - {"help", SM_CMD(help), "help [command]", "print help for command;"}, - {"info", SM_CMD(info), "info [subsystem_id]", "print information about a booted subsystem\n" + {"boot", SM_CMD(boot), _T("boot subsystem_name"), _T("bootstrap an optional environment subsystem;")}, + {"help", SM_CMD(help), _T("help [command]"), _T("print help for command;")}, + {"info", SM_CMD(info), _T("info [subsystem_id]"), _T("print information about a booted subsystem\n" "if subsystem_id is omitted, a list of booted\n" - "environment subsystems is printed."}, - {"reboot", SM_CMD(reboot), "reboot subsystem_id", "reboot an optional environment subsystem;"}, - {"shutdown", SM_CMD(shutdown), "shutdown subsystem_id", "shutdown an optional environment subsystem;"}, + "environment subsystems is printed.")}, + {"reboot", SM_CMD(reboot), _T("reboot subsystem_id"), _T("reboot an optional environment subsystem;")}, + {"shutdown", SM_CMD(shutdown), _T("shutdown subsystem_id"), _T("shutdown an optional environment subsystem;")}, }; -PSM_CMD_DESCRIPTOR LookupCommand (const char * CommandName) +TCHAR UsageMessage[RC_STRING_MAX_SIZE]; +void loadlang(PSM_CMD_DESCRIPTOR ); + +PSM_CMD_DESCRIPTOR LookupCommand (const TCHAR * CommandName) { int i; const int command_count = (sizeof Command / sizeof Command[0]); @@ -73,14 +78,16 @@ for (i=0; (i < command_count); i ++) { - if (0 == strcmp(CommandName, Command[i].Name)) + if (0 == _tcscmp(CommandName, Command[i].Name)) { break; } } if (i == command_count) { - fprintf(stderr, "Unknown command '%s'.\n", CommandName); + LoadString( GetModuleHandle(NULL), IDS_Unknown, (LPTSTR) UsageMessage,RC_STRING_MAX_SIZE); + + _ftprintf(stderr, _T("%s '%s'.\n"), UsageMessage, CommandName); return NULL; } return & Command [i]; @@ -97,18 +104,26 @@ if (3 == argc) { +#ifndef _UNICODE RtlInitAnsiString (& ProgramA, argv[2]); RtlAnsiStringToUnicodeString (& ProgramW, & ProgramA, TRUE); Status = SmExecuteProgram (hSmApiPort, & ProgramW); RtlFreeUnicodeString (& ProgramW); +#else + ProgramW = &argv[2]; + Status = SmExecuteProgram (hSmApiPort, & ProgramW); +#endif if (STATUS_SUCCESS != Status) { - printf ("Status 0x%08lx\n", Status); + LoadString( GetModuleHandle(NULL), IDS_Status, (LPTSTR) UsageMessage,RC_STRING_MAX_SIZE); + + _tprintf(UsageMessage, Status); } + } else { - argv[2]="boot"; + argv[2]=_T("boot"); return SM_CMD_CALL(help,3,argv); } return rc; @@ -125,7 +140,7 @@ case 2: for (i=0; (i < (sizeof Command / sizeof Command[0])); i ++) { - printf("%s\n", Command[i].Synopsis); + _tprintf(_T("%s\n"), Command[i].Synopsis); } break; case 3: @@ -135,7 +150,7 @@ rc = EXIT_FAILURE; break; } - printf("%s\n%s\n\n%s\n", + _tprintf(_T("%s\n%s\n\n%s\n"), cmd->Name, cmd->Synopsis, cmd->Description); @@ -180,27 +195,29 @@ & ReturnDataLength); if (STATUS_SUCCESS != Status) { - printf ("Status 0x%08lx\n", Status); + LoadString( GetModuleHandle(NULL), IDS_Status, (LPTSTR) UsageMessage,RC_STRING_MAX_SIZE); + _tprintf(UsageMessage, Status); return EXIT_FAILURE; } switch (argc) { case 2: - printf ("SM SubSystem Directory\n\n"); - printf ("SSID PID Flags\n"); - printf ("---- -------- ------------\n"); + LoadString( GetModuleHandle(NULL), IDS_SM1, (LPTSTR) UsageMessage,RC_STRING_MAX_SIZE); + _tprintf(UsageMessage); + + LoadString( GetModuleHandle(NULL), IDS_SM2, (LPTSTR) UsageMessage,RC_STRING_MAX_SIZE); for (i = 0; i < Info.bi.SubSystemCount; i ++) { - printf ("%04x %08lx %04x\n", + _tprintf(UsageMessage, Info.bi.SubSystem[i].Id, Info.bi.SubSystem[i].ProcessId, Info.bi.SubSystem[i].Flags); } break; case 3: - printf ("SubSystem ID: %d\n", Info.ssi.SubSystemId); - printf (" Flags: %04x\n", Info.ssi.Flags); - printf (" Process ID: %ld\n", Info.ssi.ProcessId); + LoadString( GetModuleHandle(NULL), IDS_ID, (LPTSTR) UsageMessage,RC_STRING_MAX_SIZE); + + _tprintf (UsageMessage, Info.ssi.SubSystemId, Info.ssi.Flags, Info.ssi.ProcessId); wprintf(L" NSRootNode: '%s'\n", Info.ssi.NameSpaceRootNode); break; default: @@ -212,8 +229,10 @@ SM_CMD_DECL(shutdown) { int rc = EXIT_SUCCESS; - - fprintf(stderr,"not implemented\n"); + + LoadString( GetModuleHandle(NULL), IDS_Not_Imp, (LPTSTR) UsageMessage,RC_STRING_MAX_SIZE); + + _ftprintf(stderr,UsageMessage); return rc; } @@ -228,19 +247,18 @@ } /* print command's synopsys */ -int print_synopsys (int argc, char *argv[]) +int print_synopsys (int argc, TCHAR *argv[]) { - fprintf (stderr, "ReactOS/Win32 Session Manager Control Tool\n\n"); - printf ("Usage:\n" - "\tsm\n" - "\tsm help [command]\n" - "\tsm command [arguments]\n\n" - "'sm help' will print the list of valid commands.\n"); + LoadString( GetModuleHandle(NULL), IDS_Mangers, (LPTSTR) UsageMessage,RC_STRING_MAX_SIZE); + _ftprintf (stderr, UsageMessage); + + LoadString( GetModuleHandle(NULL), IDS_USING, (LPTSTR) UsageMessage,RC_STRING_MAX_SIZE); + _tprintf (UsageMessage); return EXIT_SUCCESS; } /* parse and execute */ -int pande (int argc, char *argv[]) +int pande (int argc, TCHAR *argv[]) { PSM_CMD_DESCRIPTOR Command = NULL; NTSTATUS Status = STATUS_SUCCESS; @@ -258,12 +276,26 @@ /* ...and execute it */ return Command->EntryPoint (argc, argv); } - fprintf (stderr, "Failed to connect to the Session Manager! (Status=0x%08lx)\n", Status); + LoadString( GetModuleHandle(NULL), IDS_FAILS_MNG, (LPTSTR) UsageMessage,RC_STRING_MAX_SIZE); + _ftprintf (stderr, UsageMessage, Status); + return EXIT_FAILURE; } -int main (int argc, char *argv[]) +void loadlang(PSM_CMD_DESCRIPTOR cmd) { + int i=0; + if (cmd==NULL) return; + for (i=0;i < 5; i++) + { + LoadString( GetModuleHandle(NULL), IDS_boot+i, (LPTSTR) &cmd->Synopsis[i],RC_STRING_MAX_SIZE); + } +} + +int _tmain (int argc, TCHAR *argv[]) +{ + loadlang(Command); + return (1==argc) ? print_synopsys (argc, argv) : pande (argc, argv); _____ Modified: trunk/reactos/subsys/system/sm/sm.rc --- trunk/reactos/subsys/system/sm/sm.rc 2005-05-23 08:50:29 UTC (rev 15475) +++ trunk/reactos/subsys/system/sm/sm.rc 2005-05-23 16:48:22 UTC (rev 15476) @@ -1,3 +1,4 @@ +#include <windows.h> #define REACTOS_STR_FILE_DESCRIPTION "ReactOS/Win32 Session Manager Control Tool\0" #define REACTOS_STR_INTERNAL_NAME "sm\0" #define REACTOS_STR_ORIGINAL_FILENAME "sm.exe\0" @@ -2 +3,4 @@ #include <reactos/version.rc> + +#include "En.rc" +
19 years, 7 months
1
0
0
0
[hpoussin] 15475: Revert 15473 and 15474 as Alex doesn't like them
by hpoussin@svn.reactos.com
Revert 15473 and 15474 as Alex doesn't like them Modified: trunk/reactos/ntoskrnl/ke/main.c Modified: trunk/reactos/ntoskrnl/mm/mminit.c _____ Modified: trunk/reactos/ntoskrnl/ke/main.c --- trunk/reactos/ntoskrnl/ke/main.c 2005-05-23 05:20:39 UTC (rev 15474) +++ trunk/reactos/ntoskrnl/ke/main.c 2005-05-23 08:50:29 UTC (rev 15475) @@ -85,12 +85,6 @@ __attribute((noinline)) KiSystemStartup(BOOLEAN BootProcessor) { -#if defined(DBG) || defined(KDBG) - DbgPrint("\n------------------------------------------------------------ -------------------\n"); - DbgPrint("Starting ReactOS "KERNEL_VERSION_STR" (Build " - KERNEL_VERSION_BUILD_STR")\n"); -#endif - DPRINT("KiSystemStartup(%d)\n", BootProcessor); /* Initialize the Application Processor */ _____ Modified: trunk/reactos/ntoskrnl/mm/mminit.c --- trunk/reactos/ntoskrnl/mm/mminit.c 2005-05-23 05:20:39 UTC (rev 15474) +++ trunk/reactos/ntoskrnl/mm/mminit.c 2005-05-23 08:50:29 UTC (rev 15475) @@ -371,8 +371,8 @@ MmInitGlobalKernelPageDirectory(); - DPRINT("Used memory %dKb\n", (MmStats.NrTotalPages * PAGE_SIZE) / 1024); - DPRINT("Kernel Stack Limits. InitTop = 0x%x, Init = 0x%x\n", init_stack_top, init_stack); + DbgPrint("Used memory %dKb\n", (MmStats.NrTotalPages * PAGE_SIZE) / 1024); + DPRINT1("Kernel Stack Limits. InitTop = 0x%x, Init = 0x%x\n", init_stack_top, init_stack); LastKernelAddress = (ULONG_PTR)MmInitializePageList( FirstKrnlPhysAddr,
19 years, 7 months
1
0
0
0
[hpoussin] 15474: Add ReactOS version at the start of the debug log
by hpoussin@svn.reactos.com
Add ReactOS version at the start of the debug log Modified: trunk/reactos/ntoskrnl/ke/main.c _____ Modified: trunk/reactos/ntoskrnl/ke/main.c --- trunk/reactos/ntoskrnl/ke/main.c 2005-05-23 05:00:22 UTC (rev 15473) +++ trunk/reactos/ntoskrnl/ke/main.c 2005-05-23 05:20:39 UTC (rev 15474) @@ -85,6 +85,12 @@ __attribute((noinline)) KiSystemStartup(BOOLEAN BootProcessor) { +#if defined(DBG) || defined(KDBG) + DbgPrint("\n------------------------------------------------------------ -------------------\n"); + DbgPrint("Starting ReactOS "KERNEL_VERSION_STR" (Build " + KERNEL_VERSION_BUILD_STR")\n"); +#endif + DPRINT("KiSystemStartup(%d)\n", BootProcessor); /* Initialize the Application Processor */
19 years, 7 months
1
0
0
0
[hpoussin] 15473: Remove some debug messages at boot
by hpoussin@svn.reactos.com
Remove some debug messages at boot Modified: trunk/reactos/ntoskrnl/mm/mminit.c _____ Modified: trunk/reactos/ntoskrnl/mm/mminit.c --- trunk/reactos/ntoskrnl/mm/mminit.c 2005-05-22 22:12:12 UTC (rev 15472) +++ trunk/reactos/ntoskrnl/mm/mminit.c 2005-05-23 05:00:22 UTC (rev 15473) @@ -371,8 +371,8 @@ MmInitGlobalKernelPageDirectory(); - DbgPrint("Used memory %dKb\n", (MmStats.NrTotalPages * PAGE_SIZE) / 1024); - DPRINT1("Kernel Stack Limits. InitTop = 0x%x, Init = 0x%x\n", init_stack_top, init_stack); + DPRINT("Used memory %dKb\n", (MmStats.NrTotalPages * PAGE_SIZE) / 1024); + DPRINT("Kernel Stack Limits. InitTop = 0x%x, Init = 0x%x\n", init_stack_top, init_stack); LastKernelAddress = (ULONG_PTR)MmInitializePageList( FirstKrnlPhysAddr,
19 years, 7 months
1
0
0
0
[jimtabor] 15472: Revert DPRINT1.
by jimtabor@svn.reactos.com
Revert DPRINT1. Modified: trunk/reactos/drivers/usb/cromwell/sys/linuxwrapper.c _____ Modified: trunk/reactos/drivers/usb/cromwell/sys/linuxwrapper.c --- trunk/reactos/drivers/usb/cromwell/sys/linuxwrapper.c 2005-05-22 22:04:57 UTC (rev 15471) +++ trunk/reactos/drivers/usb/cromwell/sys/linuxwrapper.c 2005-05-22 22:12:12 UTC (rev 15472) @@ -74,8 +74,7 @@ void handle_irqs(int irq) { int n; -// printk("handle irqs\n"); - DPRINT1("Handle Irqs\n"); + printk("handle irqs\n"); for(n=0;n<MAX_IRQS;n++) { if (reg_irqs[n].handler && (irq==reg_irqs[n].irq || irq==-1)) @@ -101,8 +100,7 @@ main_timer_list[n]->expires=0; main_timer_list[n]=NULL; // remove timer -// printk("do timer %i fn %p\n",n,function); - DPRINT1("do timer %i fn %p\n",n,function); + printk("do timer %i fn %p\n",n,function); function(data); } @@ -156,8 +154,7 @@ int my_device_add(struct device *dev) { int n,found=0; -// printk("drv_num %i %p %p\n",drvs_num,m_drivers[0]->probe,m_drivers[1]->probe); - DPRINT1("drv_num %i %p %p\n",drvs_num,m_drivers[0]->probe,m_drivers[1]->probe); + printk("drv_num %i %p %p\n",drvs_num,m_drivers[0]->probe,m_drivers[1]->probe); if (dev->driver) { @@ -171,8 +168,7 @@ if (m_drivers[n]->probe) { dev->driver=m_drivers[n]; -// printk("probe%i %p ",n,m_drivers[n]->probe); - DPRINT1("probe%i %p ",n,m_drivers[n]->probe); + printk("probe%i %p ",n,m_drivers[n]->probe); if (m_drivers[n]->probe(dev) == 0) { @@ -192,8 +188,7 @@ if (drvs_num<MAX_DRVS) { -// printk("driver_register %i: %p %p",drvs_num,driver,driver->probe); - DPRINT1("driver_register %i: %p %p",drvs_num,driver,driver->probe); + printk("driver_register %i: %p %p",drvs_num,driver,driver->probe); m_drivers[drvs_num++]=driver; return 0; @@ -236,8 +231,7 @@ { int wait=1; x+=10; // safety -// printk("schedule_timeout %i\n",x); - DPRINT1("schedule_timeout %i\n",x); + printk("schedule_timeout %i\n",x); while(x>0) { @@ -253,8 +247,7 @@ x-=wait; } need_wakeup=0; -// printk("schedule DONE!!!!!!\n"); - DPRINT1("schedule DONE!!!!!!\n"); + printk("schedule DONE!!!!!!\n"); return x; } @@ -262,8 +255,7 @@ void my_wait_for_completion(struct completion *x) { int n=100; -// printk("wait for completion\n"); - DPRINT1("wait for completion\n"); + printk("wait for completion\n"); while(!x->done && (n>0)) { @@ -275,8 +267,7 @@ wait_ms(10); n--; } -// printk("wait for completion done %i\n",x->done); - DPRINT1("wait for completion done %i\n",x->done); + printk("wait for completion done %i\n",x->done); } /*---------------------------------------------------------------------- --*/
19 years, 7 months
1
0
0
0
[hpoussin] 15471: Fix compile error when NDEBUG is not set
by hpoussin@svn.reactos.com
Fix compile error when NDEBUG is not set Modified: trunk/reactos/ntoskrnl/ob/object.c _____ Modified: trunk/reactos/ntoskrnl/ob/object.c --- trunk/reactos/ntoskrnl/ob/object.c 2005-05-22 16:48:30 UTC (rev 15470) +++ trunk/reactos/ntoskrnl/ob/object.c 2005-05-22 22:04:57 UTC (rev 15471) @@ -709,12 +709,12 @@ if (ObjectType != NULL && Header->ObjectType != ObjectType) { - DPRINT("Failed %x (type was %x %S) should be %x %S\n", + DPRINT("Failed %p (type was %x %wZ) should be %x %wZ\n", Header, Header->ObjectType, - Header->ObjectType->TypeName.Buffer, + &BODY_TO_HEADER(Header->ObjectType)->NameInfo, ObjectType, - ObjectType->TypeName.Buffer); + &BODY_TO_HEADER(ObjectType)->NameInfo); return(STATUS_UNSUCCESSFUL); } if (Header->ObjectType == PsProcessType)
19 years, 7 months
1
0
0
0
← Newer
1
...
21
22
23
24
25
26
27
...
82
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Results per page:
10
25
50
100
200