From 97d546c77a0f478488982ef5a78885268c84e275 Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Fri, 15 Jul 2005 14:50:46 +0000 Subject: [PATCH] Forget set some error level and some msg that should have goto ConOut not to ConErr so pipe are working with thuse msg svn path=/trunk/; revision=16579 --- reactos/subsys/system/cmd/console.c | 4 ++-- reactos/subsys/system/cmd/copy.c | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/reactos/subsys/system/cmd/console.c b/reactos/subsys/system/cmd/console.c index 8e0e7ca7f00..e9a5188787f 100644 --- a/reactos/subsys/system/cmd/console.c +++ b/reactos/subsys/system/cmd/console.c @@ -349,13 +349,13 @@ VOID ConOutFormatMessage (DWORD MessageId, ...) va_end (arg_ptr); if(ret > 0) { - ConErrPuts (text); + ConOutPuts (text); LocalFree(text); } else { LoadString(CMD_ModuleHandle, STRING_CONSOLE_ERROR, szMsg, RC_STRING_MAX_SIZE); - ConErrPrintf(szMsg); + ConOutPrintf(szMsg); } } diff --git a/reactos/subsys/system/cmd/copy.c b/reactos/subsys/system/cmd/copy.c index 72ea0ab2edc..4b1e94d2a34 100644 --- a/reactos/subsys/system/cmd/copy.c +++ b/reactos/subsys/system/cmd/copy.c @@ -146,6 +146,7 @@ int copy (LPTSTR source, LPTSTR dest, int append, DWORD lpdwFlags) { CloseHandle (hFileSrc); error_path_not_found (); + nErrorLevel = 1; return 0; } buffer = (LPBYTE)malloc (BUFF_SIZE); @@ -154,6 +155,7 @@ int copy (LPTSTR source, LPTSTR dest, int append, DWORD lpdwFlags) CloseHandle (hFileDest); CloseHandle (hFileSrc); error_out_of_memory (); + nErrorLevel = 1; return 0; } @@ -434,6 +436,7 @@ INT cmd_copy (LPTSTR cmd, LPTSTR param) { /* there is too many file names in command */ error_too_many_parameters(""); + nErrorLevel = 1; return 1; } @@ -607,6 +610,7 @@ INT cmd_copy (LPTSTR cmd, LPTSTR param) { ConOutFormatMessage (GetLastError(), szSrcPath); freep (arg); + nErrorLevel = 1; return 1; } @@ -624,6 +628,7 @@ INT cmd_copy (LPTSTR cmd, LPTSTR param) { ConOutFormatMessage (GetLastError (), szSrcPath); freep (arg); + nErrorLevel = 1; return 1; } /* Copy over the destination path name */