X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=posix%2Flib%2Fpsxdll%2Fmisc%2Fpdata.c;h=f29c7904a96ae6b21fcad6e27f019fb97350d237;hp=b4748e0b2df8f6dde271f670e80dfac586d98278;hb=01011e86cc0aaea40686cb2dfc9b55056d66c6da;hpb=acbed041bbfdfe91920097c2d2f84cb223871c5f diff --git a/posix/lib/psxdll/misc/pdata.c b/posix/lib/psxdll/misc/pdata.c index b4748e0b2df..f29c7904a96 100644 --- a/posix/lib/psxdll/misc/pdata.c +++ b/posix/lib/psxdll/misc/pdata.c @@ -1,4 +1,4 @@ -/* $Id: pdata.c,v 1.2 2002/03/11 20:45:07 hyperion Exp $ +/* $Id: pdata.c,v 1.3 2002/03/21 22:43:13 hyperion Exp $ */ /* * COPYRIGHT: See COPYING in the top level directory @@ -31,12 +31,13 @@ __PdxProcessDataToProcessParameters IN PUNICODE_STRING ImageFile ) { + NTSTATUS nErrCode; UNICODE_STRING wstrEmpty = {0, 0, NULL}; UNICODE_STRING wstrCommandLine = {0, 0, NULL}; - NTSTATUS nErrCode; __fildes_t * fdDescriptor; int i; + /* RtlInitUnicodeString(&wstrEmpty, L""); */ /* TODO: error checking */ /* build the command line string from argument count and argument vector */ @@ -102,19 +103,11 @@ __PdxProcessDataToProcessParameters } } -#ifndef NDEBUG - wstrCommandLine.MaximumLength = wstrCommandLine.Length + sizeof(WCHAR); - wstrCommandLine.Buffer = __realloc(wstrCommandLine.Buffer, wstrCommandLine.MaximumLength); - wstrCommandLine.Buffer[wstrCommandLine.Length / sizeof(WCHAR)] = 0; - - INFO("command line is \"%ls\"\n", wstrCommandLine.Buffer); -#endif - - RtlCreateProcessParameters + nErrCode = RtlCreateProcessParameters ( ProcessParameters, ImageFile, - &wstrEmpty, + NULL, &wstrEmpty, &wstrCommandLine, 0, @@ -304,7 +297,7 @@ __PdxSerializeProcessData __free(pnArgLengths); __free(pnEnvVarsLengths); *SerializedProcessData = 0; - return; + return nErrCode; } INFO("%d bytes actually allocated\n", ulAllocSize); @@ -478,6 +471,8 @@ __PdxSerializeProcessData /* success */ *SerializedProcessData = pspdProcessData; + + return (STATUS_SUCCESS); } /* unserialize a process data block. Dynamic data will be moved into the default