From 9e03420395b79b678160e74a8d5746ee30fbb21f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Wed, 6 May 2015 22:07:16 +0000 Subject: [PATCH] [NTVDM]: Move the DosStartProcess dprint inside the function. svn path=/trunk/; revision=67582 --- reactos/subsystems/mvdm/ntvdm/dos/dem.c | 6 ------ reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/process.c | 9 +++++++++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/reactos/subsystems/mvdm/ntvdm/dos/dem.c b/reactos/subsystems/mvdm/ntvdm/dos/dem.c index b34d6dba82f..9e559b8dc36 100644 --- a/reactos/subsystems/mvdm/ntvdm/dos/dem.c +++ b/reactos/subsystems/mvdm/ntvdm/dos/dem.c @@ -257,11 +257,6 @@ Command: } /* Start the process from the command line */ - DPRINT1("Starting '%s' ('%.*s')...\n", - AppName, - CommandInfo.CmdLen >= 2 ? CommandInfo.CmdLen - 2 /* Display the command line without the terminating 0d 0a */ - : CommandInfo.CmdLen, - CmdLine); Result = DosStartProcess(AppName, CmdLine, Env); if (Result != ERROR_SUCCESS) { @@ -474,7 +469,6 @@ static VOID WINAPI DosStart(LPWORD Stack) } /* Start the process from the command line */ - DPRINT1("Starting '%s' ('%s')...\n", ApplicationName, CommandLine); Result = DosStartProcess(ApplicationName, CommandLine, SEG_OFF_TO_PTR(SYSTEM_ENV_BLOCK, 0)); if (Result != ERROR_SUCCESS) diff --git a/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/process.c b/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/process.c index 46f644d000f..ba44546047a 100644 --- a/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/process.c +++ b/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/process.c @@ -622,6 +622,15 @@ DWORD DosStartProcess(IN LPCSTR ExecutablePath, DWORD Result; LPDWORD IntVecTable = (LPDWORD)((ULONG_PTR)BaseAddress); + SIZE_T CmdLen = strlen(CommandLine); + DPRINT1("Starting '%s' ('%.*s')...\n", + ExecutablePath, + /* Display the command line without the terminating 0d 0a (and skip the terminating NULL) */ + CmdLen >= 2 ? (CommandLine[CmdLen - 2] == '\r' ? CmdLen - 2 + : CmdLen) + : CmdLen, + CommandLine); + Result = DosLoadExecutable(DOS_LOAD_AND_EXECUTE, ExecutablePath, NULL,