[FORMATTING] No code changes.

svn path=/trunk/; revision=35756
This commit is contained in:
Eric Kohl 2008-08-29 13:08:03 +00:00
parent 9bde3fcc59
commit 8e4fa83a87

View file

@ -6,7 +6,6 @@
* COPYRIGHT: Copyright 2005-2006 Eric Kohl * COPYRIGHT: Copyright 2005-2006 Eric Kohl
* Copyright 2006-2007 Hervé Poussineau <hpoussin@reactos.org> * Copyright 2006-2007 Hervé Poussineau <hpoussin@reactos.org>
* Copyright 2007 Ged Murphy <gedmurphy@reactos.org> * Copyright 2007 Ged Murphy <gedmurphy@reactos.org>
*
*/ */
/* INCLUDES ****************************************************************/ /* INCLUDES ****************************************************************/
@ -1168,6 +1167,7 @@ done:
return dwError; return dwError;
} }
/* Create a path suitable for the bootloader out of the full path */ /* Create a path suitable for the bootloader out of the full path */
DWORD DWORD
ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName) ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
@ -1183,12 +1183,12 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
DPRINT("ScmConvertToBootPathName %S\n", CanonName); DPRINT("ScmConvertToBootPathName %S\n", CanonName);
ServiceNameLen = wcslen(CanonName); ServiceNameLen = wcslen(CanonName);
/* First check, if it's already good */ /* First check, if it's already good */
if (ServiceNameLen > 12 && if (ServiceNameLen > 12 &&
!wcsnicmp(L"\\SystemRoot\\", CanonName, 12)) !wcsnicmp(L"\\SystemRoot\\", CanonName, 12))
{ {
*RelativeName = LocalAlloc(LMEM_ZEROINIT, ServiceNameLen * sizeof(WCHAR) + sizeof(WCHAR)); *RelativeName = LocalAlloc(LMEM_ZEROINIT, ServiceNameLen * sizeof(WCHAR) + sizeof(WCHAR));
if (*RelativeName == NULL) if (*RelativeName == NULL)
{ {
DPRINT1("Error allocating memory for boot driver name!\n"); DPRINT1("Error allocating memory for boot driver name!\n");
@ -1236,8 +1236,8 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
Expanded = LocalAlloc(LMEM_ZEROINIT, BufferSize * sizeof(WCHAR) + sizeof(WCHAR)); Expanded = LocalAlloc(LMEM_ZEROINIT, BufferSize * sizeof(WCHAR) + sizeof(WCHAR));
if (!Expanded) if (!Expanded)
{ {
DPRINT1("Error allocating memory for boot driver name!\n"); DPRINT1("Error allocating memory for boot driver name!\n");
return ERROR_NOT_ENOUGH_MEMORY; return ERROR_NOT_ENOUGH_MEMORY;
} }
/* Expand it */ /* Expand it */
@ -1279,7 +1279,6 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
/* Only \SystemRoot\ is missing */ /* Only \SystemRoot\ is missing */
*RelativeName = LocalAlloc(LMEM_ZEROINIT, *RelativeName = LocalAlloc(LMEM_ZEROINIT,
(ServiceNameLen - ExpandedLen) * sizeof(WCHAR) + 13*sizeof(WCHAR)); (ServiceNameLen - ExpandedLen) * sizeof(WCHAR) + 13*sizeof(WCHAR));
if (*RelativeName == NULL) if (*RelativeName == NULL)
{ {
DPRINT1("Error allocating memory for boot driver name!\n"); DPRINT1("Error allocating memory for boot driver name!\n");
@ -1644,9 +1643,8 @@ DWORD RCreateServiceW(
if (dwServiceType & SERVICE_DRIVER) if (dwServiceType & SERVICE_DRIVER)
{ {
dwError = ScmCanonDriverImagePath(dwStartType, dwError = ScmCanonDriverImagePath(dwStartType,
lpBinaryPathName, lpBinaryPathName,
&lpImagePath); &lpImagePath);
if (dwError != ERROR_SUCCESS) if (dwError != ERROR_SUCCESS)
goto done; goto done;
} }
@ -3210,10 +3208,10 @@ DWORD ROpenSCManagerA(
lpDatabaseName); lpDatabaseName);
dwError = ROpenSCManagerW(BindingHandle, dwError = ROpenSCManagerW(BindingHandle,
lpMachineName ? MachineName.Buffer : NULL, lpMachineName ? MachineName.Buffer : NULL,
lpDatabaseName ? DatabaseName.Buffer : NULL, lpDatabaseName ? DatabaseName.Buffer : NULL,
dwDesiredAccess, dwDesiredAccess,
lpScHandle); lpScHandle);
if (lpMachineName) if (lpMachineName)
RtlFreeUnicodeString(&MachineName); RtlFreeUnicodeString(&MachineName);
@ -3243,10 +3241,10 @@ DWORD ROpenServiceA(
lpServiceName); lpServiceName);
dwError = ROpenServiceW(BindingHandle, dwError = ROpenServiceW(BindingHandle,
hSCManager, hSCManager,
ServiceName.Buffer, lpServiceName ? ServiceName.Buffer : NULL,
dwDesiredAccess, dwDesiredAccess,
lpServiceHandle); lpServiceHandle);
if (lpServiceName) if (lpServiceName)
RtlFreeUnicodeString(&ServiceName); RtlFreeUnicodeString(&ServiceName);