https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d31a55723797ce85f60a7…
commit d31a55723797ce85f60a7fa1491d916a583b1167
Author: Joachim Henze <Joachim.Henze(a)reactos.org>
AuthorDate: Sun Mar 20 20:12:56 2022 +0100
Commit: Joachim Henze <Joachim.Henze(a)reactos.org>
CommitDate: Sun Mar 20 20:12:56 2022 +0100
[SERVICES] Tweak the binary size a bit CORE-18071
Fixes some typos like "alread"->"already"
and kill g_dwServiceBits in rpcserver.cpp
and omit points and exclamation marks at end of prints.
On GCC8.4.0dbg RosBE2.2.1 this shrinks the file for me from 210.432 to 209.920
The file is loaded many times into memory, therefore
optimization pays off here at runtime memory consumption.
Also shorten to H. Poussineau in the header sections,
to stop git from displaying diff in that line on each review
due to that special char.
---
base/system/services/controlset.c | 10 +--
base/system/services/database.c | 18 ++--
base/system/services/driver.c | 2 +-
base/system/services/rpcserver.c | 173 ++++++++++++++++++--------------------
base/system/services/services.c | 20 ++---
5 files changed, 108 insertions(+), 115 deletions(-)
diff --git a/base/system/services/controlset.c b/base/system/services/controlset.c
index e34eb2f3528..b387ffd335c 100644
--- a/base/system/services/controlset.c
+++ b/base/system/services/controlset.c
@@ -630,7 +630,7 @@ ScmCreateLastKnownGoodControlSet(VOID)
if ((ScmGetSetupInProgress() == 0) &&
(dwCurrentControlSet == dwLastKnownGoodControlSet))
{
- DPRINT("First boot after setup!\n");
+ DPRINT("First boot after setup\n");
/* Search for a new control set number */
for (dwNewControlSet = 1; dwNewControlSet < 1000; dwNewControlSet++)
@@ -645,7 +645,7 @@ ScmCreateLastKnownGoodControlSet(VOID)
/* Fail if we did not find an unused control set!*/
if (dwNewControlSet >= 1000)
{
- DPRINT1("Too many control sets!\n");
+ DPRINT1("Too many control sets\n");
return ERROR_NO_MORE_ITEMS;
}
@@ -683,7 +683,7 @@ ScmAcceptBoot(VOID)
if (bBootAccepted)
{
- DPRINT1("Boot has alread been accepted!\n");
+ DPRINT1("Boot has already been accepted\n");
return ERROR_BOOT_ALREADY_ACCEPTED;
}
@@ -708,7 +708,7 @@ ScmAcceptBoot(VOID)
/* Fail if we did not find an unused control set!*/
if (dwNewControlSet >= 1000)
{
- DPRINT1("Too many control sets!\n");
+ DPRINT1("Too many control sets\n");
return ERROR_NO_MORE_ITEMS;
}
@@ -744,7 +744,7 @@ ScmRunLastKnownGood(VOID)
if (bBootAccepted)
{
- DPRINT1("Boot has alread been accepted!\n");
+ DPRINT1("Boot has already been accepted\n");
return ERROR_BOOT_ALREADY_ACCEPTED;
}
diff --git a/base/system/services/database.c b/base/system/services/database.c
index 6b710926205..ad790736177 100644
--- a/base/system/services/database.c
+++ b/base/system/services/database.c
@@ -4,7 +4,7 @@
* FILE: base/system/services/database.c
* PURPOSE: Database control interface
* COPYRIGHT: Copyright 2002-2006 Eric Kohl
- * Copyright 2006 Herv� Poussineau <hpoussin(a)reactos.org>
+ * Copyright 2006 H. Poussineau <hpoussin(a)reactos.org>
* Copyright 2007 Ged Murphy <gedmurphy(a)reactos.org>
* Gregor Brunmar <gregor.brunmar(a)home.se>
*
@@ -141,7 +141,7 @@ ScmCreateNewControlPipe(
DPRINT("CreateNamedPipeW(%S) done\n", szControlPipeName);
if (pServiceImage->hControlPipe == INVALID_HANDLE_VALUE)
{
- DPRINT1("Failed to create control pipe!\n");
+ DPRINT1("Failed to create control pipe\n");
return GetLastError();
}
@@ -323,7 +323,7 @@ ScmEnableBackupRestorePrivileges(
pTokenPrivileges = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dwSize);
if (pTokenPrivileges == NULL)
{
- DPRINT1("Failed to allocate the privilege buffer!\n");
+ DPRINT1("Failed to allocate privilege buffer\n");
goto done;
}
@@ -989,7 +989,7 @@ CreateServiceListEntry(LPCWSTR lpServiceName,
/* Assing the default security descriptor if the security descriptor cannot be
read */
if (lpService->pSecurityDescriptor == NULL)
{
- DPRINT("No security descriptor found! Assign default security
descriptor!\n");
+ DPRINT("No security descriptor found! Assign default security
descriptor\n");
dwError = ScmCreateDefaultServiceSD(&lpService->pSecurityDescriptor);
if (dwError != ERROR_SUCCESS)
goto done;
@@ -1769,7 +1769,7 @@ ScmWaitForServiceConnect(PSERVICE Service)
}
}
- DPRINT("Control pipe connected!\n");
+ DPRINT("Control pipe connected\n");
Overlapped.hEvent = (HANDLE) NULL;
@@ -1901,7 +1901,7 @@ ScmStartUserModeService(PSERVICE Service,
if (!CreateEnvironmentBlock(&lpEnvironment, Service->lpImage->hToken,
FALSE))
{
/* We failed, run the service with the current environment */
- DPRINT1("CreateEnvironmentBlock() failed with error %d; service
'%S' will run with the current environment.\n",
+ DPRINT1("CreateEnvironmentBlock() failed with error %d; service
'%S' will run with current environment\n",
GetLastError(), Service->lpServiceName);
lpEnvironment = NULL;
}
@@ -1941,7 +1941,7 @@ ScmStartUserModeService(PSERVICE Service,
if (!CreateEnvironmentBlock(&lpEnvironment, NULL, TRUE))
{
/* We failed, run the service with the current environment */
- DPRINT1("CreateEnvironmentBlock() failed with error %d; service
'%S' will run with the current environment.\n",
+ DPRINT1("CreateEnvironmentBlock() failed with error %d; service
'%S' will run with current environment\n",
GetLastError(), Service->lpServiceName);
lpEnvironment = NULL;
}
@@ -2030,7 +2030,7 @@ ScmLoadService(PSERVICE Service,
if (Service->Status.dwCurrentState != SERVICE_STOPPED)
{
- DPRINT("Service %S is already running!\n", Service->lpServiceName);
+ DPRINT("Service %S is already running\n", Service->lpServiceName);
return ERROR_SERVICE_ALREADY_RUNNING;
}
@@ -2273,7 +2273,7 @@ ScmAutoStartServices(VOID)
}
else
{
- DPRINT1("WARNING: Could not open the associated Safe Boot
key!");
+ DPRINT1("WARNING: Could not open the associated Safe Boot
key");
CurrentService->ServiceVisited = FALSE;
}
}
diff --git a/base/system/services/driver.c b/base/system/services/driver.c
index 2293acd053d..cc4fe24b781 100644
--- a/base/system/services/driver.c
+++ b/base/system/services/driver.c
@@ -179,7 +179,7 @@ ScmGetDriverStatus(PSERVICE lpService,
&ObjectAttributes);
if (!NT_SUCCESS(Status))
{
- DPRINT1("NtOpenDirectoryObject() failed!\n");
+ DPRINT1("NtOpenDirectoryObject() failed\n");
return RtlNtStatusToDosError(Status);
}
diff --git a/base/system/services/rpcserver.c b/base/system/services/rpcserver.c
index 741dc1c84e1..2c8e96d3b57 100644
--- a/base/system/services/rpcserver.c
+++ b/base/system/services/rpcserver.c
@@ -4,7 +4,7 @@
* FILE: base/system/services/rpcserver.c
* PURPOSE: RPC server interface for the advapi32 calls
* COPYRIGHT: Copyright 2005-2006 Eric Kohl
- * Copyright 2006-2007 Hervé Poussineau <hpoussin(a)reactos.org>
+ * Copyright 2006-2007 H. Poussineau <hpoussin(a)reactos.org>
* Copyright 2007 Ged Murphy <gedmurphy(a)reactos.org>
*/
@@ -99,7 +99,6 @@ ScmServiceMapping = {SERVICE_READ,
SERVICE_EXECUTE,
SERVICE_ALL_ACCESS};
-DWORD g_dwServiceBits = 0;
/* FUNCTIONS ***************************************************************/
@@ -156,7 +155,7 @@ ScmCreateManagerHandle(LPWSTR lpDatabaseName,
}
else if (_wcsicmp(lpDatabaseName, SERVICES_ACTIVE_DATABASEW) != 0)
{
- DPRINT("Invalid Database name %S.\n", lpDatabaseName);
+ DPRINT("Invalid Database name %S\n", lpDatabaseName);
return ERROR_INVALID_NAME;
}
@@ -210,7 +209,7 @@ ScmGetServiceManagerFromHandle(SC_RPC_HANDLE Handle)
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- DPRINT1("Exception: Invalid Service Manager handle!\n");
+ DPRINT1("Exception: Invalid Service Manager handle\n");
}
_SEH2_END;
@@ -230,7 +229,7 @@ ScmGetServiceFromHandle(SC_RPC_HANDLE Handle)
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- DPRINT1("Exception: Invalid Service handle!\n");
+ DPRINT1("Exception: Invalid Service handle\n");
}
_SEH2_END;
@@ -429,7 +428,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
(ServiceNameLen + 1) * sizeof(WCHAR));
if (*RelativeName == NULL)
{
- DPRINT("Error allocating memory for boot driver name!\n");
+ DPRINT("Error allocating memory for boot driver name\n");
return ERROR_NOT_ENOUGH_MEMORY;
}
@@ -451,7 +450,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
if (*RelativeName == NULL)
{
- DPRINT("Error allocating memory for boot driver name!\n");
+ DPRINT("Error allocating memory for boot driver name\n");
return ERROR_NOT_ENOUGH_MEMORY;
}
@@ -477,7 +476,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
(BufferSize + 1) * sizeof(WCHAR));
if (!Expanded)
{
- DPRINT("Error allocating memory for boot driver name!\n");
+ DPRINT("Error allocating memory for boot driver name\n");
return ERROR_NOT_ENOUGH_MEMORY;
}
@@ -508,7 +507,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
NtPathName.Length + sizeof(UNICODE_NULL));
if (!Expanded)
{
- DPRINT("Error allocating memory for boot driver name!\n");
+ DPRINT("Error allocating memory for boot driver name\n");
RtlFreeUnicodeString(&NtPathName);
return ERROR_NOT_ENOUGH_MEMORY;
}
@@ -529,7 +528,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
(ServiceNameLen - ExpandedLen) * sizeof(WCHAR) +
13*sizeof(WCHAR));
if (*RelativeName == NULL)
{
- DPRINT("Error allocating memory for boot driver name!\n");
+ DPRINT("Error allocating memory for boot driver name\n");
return ERROR_NOT_ENOUGH_MEMORY;
}
@@ -663,7 +662,7 @@ ScmCanonDriverImagePath(DWORD dwStartType,
if (*lpCanonName == NULL)
{
- DPRINT("Error allocating memory for canonized service name!\n");
+ DPRINT("Error allocating memory for canonized service name\n");
return ERROR_NOT_ENOUGH_MEMORY;
}
@@ -689,7 +688,7 @@ ScmCanonDriverImagePath(DWORD dwStartType,
if (*lpCanonName == NULL)
{
- DPRINT("Error allocating memory for canonized service name!\n");
+ DPRINT("Error allocating memory for canonized service name\n");
return ERROR_NOT_ENOUGH_MEMORY;
}
@@ -712,7 +711,7 @@ ScmCanonDriverImagePath(DWORD dwStartType,
if (*lpCanonName == NULL)
{
- DPRINT("Error allocating memory for canonized service name!\n");
+ DPRINT("Error allocating memory for canonized service name\n");
return ERROR_NOT_ENOUGH_MEMORY;
}
@@ -725,7 +724,7 @@ ScmCanonDriverImagePath(DWORD dwStartType,
/* It seems to be a DOS path, convert it */
if (!RtlDosPathNameToNtPathName_U(lpServiceName, &NtServiceName, NULL, NULL))
{
- DPRINT("RtlDosPathNameToNtPathName_U() failed!\n");
+ DPRINT("RtlDosPathNameToNtPathName_U() failed\n");
return ERROR_INVALID_PARAMETER;
}
@@ -735,7 +734,7 @@ ScmCanonDriverImagePath(DWORD dwStartType,
if (*lpCanonName == NULL)
{
- DPRINT("Error allocating memory for canonized service name!\n");
+ DPRINT("Error allocating memory for canonized service name\n");
RtlFreeUnicodeString(&NtServiceName);
return ERROR_NOT_ENOUGH_MEMORY;
}
@@ -758,7 +757,7 @@ ScmCanonDriverImagePath(DWORD dwStartType,
{
/* There is a problem, free name and return */
HeapFree(GetProcessHeap(), 0, *lpCanonName);
- DPRINT("Error converting named!\n");
+ DPRINT("Error converting named\n");
return Result;
}
@@ -816,7 +815,7 @@ Int_EnumDependentServicesW(HKEY hServicesKey,
NULL);
if (dwError != ERROR_SUCCESS)
{
- DPRINT("ERROR! Unable to get number of services keys.\n");
+ DPRINT("ERROR! Unable to get number of services keys\n");
return dwError;
}
@@ -1022,7 +1021,7 @@ RCloseServiceHandle(
/* If pcbBytesNeeded returned a value then there are services running
that are dependent on this service */
if (pcbBytesNeeded)
{
- DPRINT("Deletion failed due to running dependencies.\n");
+ DPRINT("Deletion failed due to running dependencies\n");
RegCloseKey(hServicesKey);
ScmUnlockDatabase();
return ERROR_SUCCESS;
@@ -1093,7 +1092,7 @@ RControlService(
hSvc = ScmGetServiceFromHandle(hService);
if (hSvc == NULL)
{
- DPRINT1("Invalid service handle!\n");
+ DPRINT1("Invalid service handle\n");
return ERROR_INVALID_HANDLE;
}
@@ -1101,7 +1100,7 @@ RControlService(
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
- DPRINT1("lpService == NULL!\n");
+ DPRINT1("lpService == NULL\n");
return ERROR_INVALID_HANDLE;
}
@@ -1174,7 +1173,7 @@ RControlService(
are dependent on this service */
if (pcbBytesNeeded != 0)
{
- DPRINT("Service has running dependencies. Failed to stop
service.\n");
+ DPRINT("Service has running dependencies. Failed to stop
service\n");
return ERROR_DEPENDENT_SERVICES_RUNNING;
}
}
@@ -1316,7 +1315,7 @@ RDeleteService(
hSvc = ScmGetServiceFromHandle(hService);
if (hSvc == NULL)
{
- DPRINT1("Invalid service handle!\n");
+ DPRINT1("Invalid service handle\n");
return ERROR_INVALID_HANDLE;
}
@@ -1327,7 +1326,7 @@ RDeleteService(
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
- DPRINT("lpService == NULL!\n");
+ DPRINT("lpService == NULL\n");
return ERROR_INVALID_HANDLE;
}
@@ -1336,7 +1335,7 @@ RDeleteService(
if (lpService->bDeleted)
{
- DPRINT("The service has already been marked for delete!\n");
+ DPRINT("Service has already been marked for delete\n");
dwError = ERROR_SERVICE_MARKED_FOR_DELETE;
goto Done;
}
@@ -1372,7 +1371,7 @@ RLockServiceDatabase(
hMgr = ScmGetServiceManagerFromHandle(hSCManager);
if (hMgr == NULL)
{
- DPRINT1("Invalid service manager handle!\n");
+ DPRINT1("Invalid service manager handle\n");
return ERROR_INVALID_HANDLE;
}
@@ -1406,7 +1405,7 @@ RQueryServiceObjectSecurity(
hSvc = ScmGetServiceFromHandle(hService);
if (hSvc == NULL)
{
- DPRINT1("Invalid service handle!\n");
+ DPRINT1("Invalid service handle\n");
return ERROR_INVALID_HANDLE;
}
@@ -1428,7 +1427,7 @@ RQueryServiceObjectSecurity(
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
- DPRINT("lpService == NULL!\n");
+ DPRINT("lpService == NULL\n");
return ERROR_INVALID_HANDLE;
}
@@ -1491,7 +1490,7 @@ RSetServiceObjectSecurity(
hSvc = ScmGetServiceFromHandle(hService);
if (hSvc == NULL)
{
- DPRINT1("Invalid service handle!\n");
+ DPRINT1("Invalid service handle\n");
return ERROR_INVALID_HANDLE;
}
@@ -1536,7 +1535,7 @@ RSetServiceObjectSecurity(
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
- DPRINT1("lpService == NULL!\n");
+ DPRINT1("lpService == NULL\n");
return ERROR_INVALID_HANDLE;
}
@@ -1620,7 +1619,7 @@ RQueryServiceStatus(
hSvc = ScmGetServiceFromHandle(hService);
if (hSvc == NULL)
{
- DPRINT1("Invalid service handle!\n");
+ DPRINT1("Invalid service handle\n");
return ERROR_INVALID_HANDLE;
}
@@ -1634,7 +1633,7 @@ RQueryServiceStatus(
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
- DPRINT("lpService == NULL!\n");
+ DPRINT("lpService == NULL\n");
return ERROR_INVALID_HANDLE;
}
@@ -1699,7 +1698,7 @@ RSetServiceStatus(
if (hServiceStatus == 0)
{
- DPRINT("hServiceStatus == NULL!\n");
+ DPRINT("hServiceStatus == NULL\n");
return ERROR_INVALID_HANDLE;
}
@@ -1708,7 +1707,7 @@ RSetServiceStatus(
/* Check current state */
if (!ScmIsValidServiceState(lpServiceStatus->dwCurrentState))
{
- DPRINT("Invalid service state!\n");
+ DPRINT("Invalid service state\n");
return ERROR_INVALID_DATA;
}
@@ -1716,14 +1715,14 @@ RSetServiceStatus(
if (!(lpServiceStatus->dwServiceType & SERVICE_WIN32) &&
(lpServiceStatus->dwServiceType & SERVICE_DRIVER))
{
- DPRINT("Invalid service type!\n");
+ DPRINT("Invalid service type\n");
return ERROR_INVALID_DATA;
}
/* Check accepted controls */
if (lpServiceStatus->dwControlsAccepted & ~0xFF)
{
- DPRINT("Invalid controls accepted!\n");
+ DPRINT("Invalid controls accepted\n");
return ERROR_INVALID_DATA;
}
@@ -1884,7 +1883,7 @@ RI_ScSetServiceBitsW(
if (hServiceStatus == 0)
{
- DPRINT("hServiceStatus == NULL!\n");
+ DPRINT("hServiceStatus == NULL\n");
return ERROR_INVALID_HANDLE;
}
@@ -1894,20 +1893,14 @@ RI_ScSetServiceBitsW(
if (bSetBitsOn)
{
DPRINT("Old service bits: %08lx\n", pService->dwServiceBits);
- DPRINT("Old global service bits: %08lx\n", g_dwServiceBits);
pService->dwServiceBits |= dwServiceBits;
- g_dwServiceBits |= dwServiceBits;
DPRINT("New service bits: %08lx\n", pService->dwServiceBits);
- DPRINT("New global service bits: %08lx\n", g_dwServiceBits);
}
else
{
DPRINT("Old service bits: %08lx\n", pService->dwServiceBits);
- DPRINT("Old global service bits: %08lx\n", g_dwServiceBits);
pService->dwServiceBits &= ~dwServiceBits;
- g_dwServiceBits &= ~dwServiceBits;
DPRINT("New service bits: %08lx\n", pService->dwServiceBits);
- DPRINT("New global service bits: %08lx\n", g_dwServiceBits);
}
return ERROR_SUCCESS;
@@ -1957,7 +1950,7 @@ RChangeServiceConfigW(
hSvc = ScmGetServiceFromHandle(hService);
if (hSvc == NULL)
{
- DPRINT1("Invalid service handle!\n");
+ DPRINT1("Invalid service handle\n");
return ERROR_INVALID_HANDLE;
}
@@ -2016,7 +2009,7 @@ RChangeServiceConfigW(
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
- DPRINT("lpService == NULL!\n");
+ DPRINT("lpService == NULL\n");
return ERROR_INVALID_HANDLE;
}
@@ -2025,7 +2018,7 @@ RChangeServiceConfigW(
if (lpService->bDeleted)
{
- DPRINT("The service has already been marked for delete!\n");
+ DPRINT("Service has already been marked for delete\n");
dwError = ERROR_SERVICE_MARKED_FOR_DELETE;
goto done;
}
@@ -2313,7 +2306,7 @@ RCreateServiceW(
hManager = ScmGetServiceManagerFromHandle(hSCManager);
if (hManager == NULL)
{
- DPRINT1("Invalid service manager handle!\n");
+ DPRINT1("Invalid service manager handle\n");
return ERROR_INVALID_HANDLE;
}
@@ -2730,7 +2723,7 @@ REnumDependentServicesW(
hSvc = ScmGetServiceFromHandle(hService);
if (hSvc == NULL)
{
- DPRINT1("Invalid service handle!\n");
+ DPRINT1("Invalid service handle\n");
return ERROR_INVALID_HANDLE;
}
@@ -2777,7 +2770,7 @@ REnumDependentServicesW(
(dwServicesReturned + 1) * sizeof(PSERVICE));
if (!lpServicesArray)
{
- DPRINT1("Could not allocate a buffer!!\n");
+ DPRINT1("Could not allocate buffer\n");
dwError = ERROR_NOT_ENOUGH_MEMORY;
goto Done;
}
@@ -2940,7 +2933,7 @@ ROpenServiceW(
hManager = ScmGetServiceManagerFromHandle(hSCManager);
if (hManager == NULL)
{
- DPRINT1("Invalid service manager handle!\n");
+ DPRINT1("Invalid service manager handle\n");
return ERROR_INVALID_HANDLE;
}
@@ -2957,7 +2950,7 @@ ROpenServiceW(
lpService = ScmGetServiceEntryByName(lpServiceName);
if (lpService == NULL)
{
- DPRINT("Could not find the service!\n");
+ DPRINT("Could not find service\n");
dwError = ERROR_SERVICE_DOES_NOT_EXIST;
goto Done;
}
@@ -3026,7 +3019,7 @@ RQueryServiceConfigW(
hSvc = ScmGetServiceFromHandle(hService);
if (hSvc == NULL)
{
- DPRINT1("Invalid service handle!\n");
+ DPRINT1("Invalid service handle\n");
return ERROR_INVALID_HANDLE;
}
@@ -3040,7 +3033,7 @@ RQueryServiceConfigW(
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
- DPRINT("lpService == NULL!\n");
+ DPRINT("lpService == NULL\n");
return ERROR_INVALID_HANDLE;
}
@@ -3224,7 +3217,7 @@ RQueryServiceLockStatusW(
hMgr = ScmGetServiceManagerFromHandle(hSCManager);
if (hMgr == NULL)
{
- DPRINT1("Invalid service manager handle!\n");
+ DPRINT1("Invalid service manager handle\n");
return ERROR_INVALID_HANDLE;
}
@@ -3280,7 +3273,7 @@ RStartServiceW(
hSvc = ScmGetServiceFromHandle(hService);
if (hSvc == NULL)
{
- DPRINT1("Invalid service handle!\n");
+ DPRINT1("Invalid service handle\n");
return ERROR_INVALID_HANDLE;
}
@@ -3294,7 +3287,7 @@ RStartServiceW(
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
- DPRINT("lpService == NULL!\n");
+ DPRINT("lpService == NULL\n");
return ERROR_INVALID_HANDLE;
}
@@ -3336,7 +3329,7 @@ RGetServiceDisplayNameW(
hManager = (PMANAGER_HANDLE)hSCManager;
if (hManager->Handle.Tag != MANAGER_TAG)
{
- DPRINT("Invalid manager handle!\n");
+ DPRINT("Invalid manager handle\n");
return ERROR_INVALID_HANDLE;
}
#endif
@@ -3345,7 +3338,7 @@ RGetServiceDisplayNameW(
lpService = ScmGetServiceEntryByName(lpServiceName);
if (lpService == NULL)
{
- DPRINT("Could not find the service!\n");
+ DPRINT("Could not find service\n");
return ERROR_SERVICE_DOES_NOT_EXIST;
}
@@ -3398,7 +3391,7 @@ RGetServiceKeyNameW(
hManager = (PMANAGER_HANDLE)hSCManager;
if (hManager->Handle.Tag != MANAGER_TAG)
{
- DPRINT("Invalid manager handle!\n");
+ DPRINT("Invalid manager handle\n");
return ERROR_INVALID_HANDLE;
}
#endif
@@ -3407,7 +3400,7 @@ RGetServiceKeyNameW(
lpService = ScmGetServiceEntryByDisplayName(lpDisplayName);
if (lpService == NULL)
{
- DPRINT("Could not find the service!\n");
+ DPRINT("Could not find service\n");
return ERROR_SERVICE_DOES_NOT_EXIST;
}
@@ -3768,7 +3761,7 @@ REnumDependentServicesA(
hSvc = ScmGetServiceFromHandle(hService);
if (hSvc == NULL)
{
- DPRINT1("Invalid service handle!\n");
+ DPRINT1("Invalid service handle\n");
return ERROR_INVALID_HANDLE;
}
@@ -3820,7 +3813,7 @@ REnumDependentServicesA(
(dwServicesReturned + 1) * sizeof(PSERVICE));
if (!lpServicesArray)
{
- DPRINT("Could not allocate a buffer!!\n");
+ DPRINT("Could not allocate buffer\n");
dwError = ERROR_NOT_ENOUGH_MEMORY;
goto Done;
}
@@ -3926,7 +3919,7 @@ REnumServicesStatusA(
lpStatusPtrW = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dwBufSize);
if (!lpStatusPtrW)
{
- DPRINT("Failed to allocate buffer!\n");
+ DPRINT("Failed to allocate buffer\n");
return ERROR_NOT_ENOUGH_MEMORY;
}
}
@@ -4097,7 +4090,7 @@ RQueryServiceConfigA(
hSvc = ScmGetServiceFromHandle(hService);
if (hSvc == NULL)
{
- DPRINT1("Invalid service handle!\n");
+ DPRINT1("Invalid service handle\n");
return ERROR_INVALID_HANDLE;
}
@@ -4111,7 +4104,7 @@ RQueryServiceConfigA(
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
- DPRINT("lpService == NULL!\n");
+ DPRINT("lpService == NULL\n");
return ERROR_INVALID_HANDLE;
}
@@ -4328,7 +4321,7 @@ RQueryServiceLockStatusA(
hMgr = ScmGetServiceManagerFromHandle(hSCManager);
if (hMgr == NULL)
{
- DPRINT1("Invalid service manager handle!\n");
+ DPRINT1("Invalid service manager handle\n");
return ERROR_INVALID_HANDLE;
}
@@ -4375,7 +4368,7 @@ RStartServiceA(
hSvc = ScmGetServiceFromHandle(hService);
if (hSvc == NULL)
{
- DPRINT1("Invalid service handle!\n");
+ DPRINT1("Invalid service handle\n");
return ERROR_INVALID_HANDLE;
}
@@ -4389,7 +4382,7 @@ RStartServiceA(
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
- DPRINT("lpService == NULL!\n");
+ DPRINT("lpService == NULL\n");
return ERROR_INVALID_HANDLE;
}
@@ -4479,7 +4472,7 @@ RGetServiceDisplayNameA(
hManager = (PMANAGER_HANDLE)hSCManager;
if (hManager->Handle.Tag != MANAGER_TAG)
{
- DPRINT("Invalid manager handle!\n");
+ DPRINT("Invalid manager handle\n");
return ERROR_INVALID_HANDLE;
}
#endif
@@ -4508,7 +4501,7 @@ RGetServiceDisplayNameA(
if (lpService == NULL)
{
- DPRINT("Could not find the service!\n");
+ DPRINT("Could not find service\n");
return ERROR_SERVICE_DOES_NOT_EXIST;
}
@@ -4600,7 +4593,7 @@ RGetServiceKeyNameA(
hManager = (PMANAGER_HANDLE)hSCManager;
if (hManager->Handle.Tag != MANAGER_TAG)
{
- DPRINT("Invalid manager handle!\n");
+ DPRINT("Invalid manager handle\n");
return ERROR_INVALID_HANDLE;
}
#endif
@@ -4627,7 +4620,7 @@ RGetServiceKeyNameA(
if (lpService == NULL)
{
- DPRINT("Could not find the service!\n");
+ DPRINT("Could not find service\n");
return ERROR_SERVICE_DOES_NOT_EXIST;
}
@@ -4710,7 +4703,7 @@ RI_ScGetCurrentGroupStateW(
hManager = ScmGetServiceManagerFromHandle(hSCManager);
if (hManager == NULL)
{
- DPRINT1("Invalid service manager handle!\n");
+ DPRINT1("Invalid service manager handle\n");
return ERROR_INVALID_HANDLE;
}
@@ -4782,7 +4775,7 @@ REnumServiceGroupW(
hManager = ScmGetServiceManagerFromHandle(hSCManager);
if (hManager == NULL)
{
- DPRINT1("Invalid service manager handle!\n");
+ DPRINT1("Invalid service manager handle\n");
return ERROR_INVALID_HANDLE;
}
@@ -4797,14 +4790,14 @@ REnumServiceGroupW(
if ((dwServiceType == 0) ||
((dwServiceType & ~SERVICE_TYPE_ALL) != 0))
{
- DPRINT("Not a valid Service Type!\n");
+ DPRINT("Invalid Service Type\n");
return ERROR_INVALID_PARAMETER;
}
if ((dwServiceState == 0) ||
((dwServiceState & ~SERVICE_STATE_ALL) != 0))
{
- DPRINT("Not a valid Service State!\n");
+ DPRINT("Invalid Service State\n");
return ERROR_INVALID_PARAMETER;
}
@@ -5442,7 +5435,7 @@ RChangeServiceConfig2W(
hSvc = ScmGetServiceFromHandle(hService);
if (hSvc == NULL)
{
- DPRINT("Invalid service handle!\n");
+ DPRINT("Invalid service handle\n");
return ERROR_INVALID_HANDLE;
}
@@ -5466,7 +5459,7 @@ RChangeServiceConfig2W(
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
- DPRINT("lpService == NULL!\n");
+ DPRINT("lpService == NULL\n");
return ERROR_INVALID_HANDLE;
}
@@ -5482,7 +5475,7 @@ RChangeServiceConfig2W(
if (lpService->bDeleted)
{
- DPRINT("The service has already been marked for delete!\n");
+ DPRINT("Service has already been marked for delete\n");
dwError = ERROR_SERVICE_MARKED_FOR_DELETE;
goto done;
}
@@ -5584,7 +5577,7 @@ RQueryServiceConfig2A(
hSvc = ScmGetServiceFromHandle(hService);
if (hSvc == NULL)
{
- DPRINT1("Invalid service handle!\n");
+ DPRINT1("Invalid service handle\n");
return ERROR_INVALID_HANDLE;
}
@@ -5598,7 +5591,7 @@ RQueryServiceConfig2A(
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
- DPRINT("lpService == NULL!\n");
+ DPRINT("lpService == NULL\n");
return ERROR_INVALID_HANDLE;
}
@@ -5830,7 +5823,7 @@ RQueryServiceConfig2W(
hSvc = ScmGetServiceFromHandle(hService);
if (hSvc == NULL)
{
- DPRINT1("Invalid service handle!\n");
+ DPRINT1("Invalid service handle\n");
return ERROR_INVALID_HANDLE;
}
@@ -5844,7 +5837,7 @@ RQueryServiceConfig2W(
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
- DPRINT("lpService == NULL!\n");
+ DPRINT("lpService == NULL\n");
return ERROR_INVALID_HANDLE;
}
@@ -6047,7 +6040,7 @@ RQueryServiceStatusEx(
hSvc = ScmGetServiceFromHandle(hService);
if (hSvc == NULL)
{
- DPRINT1("Invalid service handle!\n");
+ DPRINT1("Invalid service handle\n");
return ERROR_INVALID_HANDLE;
}
@@ -6061,7 +6054,7 @@ RQueryServiceStatusEx(
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
- DPRINT("lpService == NULL!\n");
+ DPRINT("lpService == NULL\n");
return ERROR_INVALID_HANDLE;
}
@@ -6126,7 +6119,7 @@ REnumServicesStatusExA(
pszGroupNameW = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
(strlen(pszGroupName) + 1) * sizeof(WCHAR));
if (!pszGroupNameW)
{
- DPRINT("Failed to allocate buffer!\n");
+ DPRINT("Failed to allocate buffer\n");
dwError = ERROR_NOT_ENOUGH_MEMORY;
goto Done;
}
@@ -6144,7 +6137,7 @@ REnumServicesStatusExA(
lpStatusPtrW = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, cbBufSize);
if (!lpStatusPtrW)
{
- DPRINT("Failed to allocate buffer!\n");
+ DPRINT("Failed to allocate buffer\n");
dwError = ERROR_NOT_ENOUGH_MEMORY;
goto Done;
}
@@ -6268,7 +6261,7 @@ REnumServicesStatusExW(
hManager = ScmGetServiceManagerFromHandle(hSCManager);
if (hManager == NULL)
{
- DPRINT1("Invalid service manager handle!\n");
+ DPRINT1("Invalid service manager handle\n");
return ERROR_INVALID_HANDLE;
}
@@ -6283,14 +6276,14 @@ REnumServicesStatusExW(
if ((dwServiceType == 0) ||
((dwServiceType & ~SERVICE_TYPE_ALL) != 0))
{
- DPRINT("Not a valid Service Type!\n");
+ DPRINT("Invalid Service Type\n");
return ERROR_INVALID_PARAMETER;
}
if ((dwServiceState == 0) ||
((dwServiceState & ~SERVICE_STATE_ALL) != 0))
{
- DPRINT("Not a valid Service State!\n");
+ DPRINT("Invalid Service State\n");
return ERROR_INVALID_PARAMETER;
}
@@ -6298,7 +6291,7 @@ REnumServicesStatusExW(
if (!RtlAreAllAccessesGranted(hManager->Handle.DesiredAccess,
SC_MANAGER_ENUMERATE_SERVICE))
{
- DPRINT("Insufficient access rights! 0x%lx\n",
+ DPRINT("Insufficient access rights 0x%lx\n",
hManager->Handle.DesiredAccess);
return ERROR_ACCESS_DENIED;
}
diff --git a/base/system/services/services.c b/base/system/services/services.c
index 7721eb95042..b45ac07b745 100644
--- a/base/system/services/services.c
+++ b/base/system/services/services.c
@@ -103,7 +103,7 @@ CheckForLiveCD(VOID)
/* Check for the '-mini' option */
if (wcsstr(CommandLine, L" -mini") != NULL)
{
- DPRINT1("Running on LiveCD!\n");
+ DPRINT1("Running on LiveCD\n");
ScmLiveSetup = TRUE;
}
@@ -189,9 +189,9 @@ ScmWaitForLsa(VOID)
}
else
{
- DPRINT("Wait for the LSA server!\n");
+ DPRINT("Wait for the LSA server\n");
WaitForSingleObject(hEvent, INFINITE);
- DPRINT("LSA server running!\n");
+ DPRINT("LSA server running\n");
CloseHandle(hEvent);
}
@@ -206,7 +206,7 @@ ShutdownHandlerRoutine(DWORD dwCtrlType)
if (dwCtrlType & (CTRL_SHUTDOWN_EVENT | CTRL_LOGOFF_EVENT))
{
- DPRINT1("Shutdown event received!\n");
+ DPRINT1("Shutdown event received\n");
ScmShutdown = TRUE;
ScmAutoShutdownServices();
@@ -254,7 +254,7 @@ wWinMain(HINSTANCE hInstance,
DPRINT1("SERVICES: Failed to create the start event\n");
goto done;
}
- DPRINT("SERVICES: Created start event with handle %p.\n", hScmStartEvent);
+ DPRINT("SERVICES: Created start event with handle %p\n", hScmStartEvent);
/* Create the auto-start complete event */
hScmAutoStartCompleteEvent = CreateEventW(NULL, TRUE, FALSE,
SCM_AUTOSTARTCOMPLETE_EVENT);
@@ -263,7 +263,7 @@ wWinMain(HINSTANCE hInstance,
DPRINT1("SERVICES: Failed to create the auto-start complete event\n");
goto done;
}
- DPRINT("SERVICES: created auto-start complete event with handle %p.\n",
hScmAutoStartCompleteEvent);
+ DPRINT("SERVICES: created auto-start complete event with handle %p\n",
hScmAutoStartCompleteEvent);
/* Create the shutdown event */
hScmShutdownEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
@@ -316,7 +316,7 @@ wWinMain(HINSTANCE hInstance,
dwError = ScmAcquireServiceStartLock(TRUE, &Lock);
if (dwError != ERROR_SUCCESS)
{
- DPRINT1("SERVICES: Failed to acquire the service start lock (Error
%lu)\n", dwError);
+ DPRINT1("SERVICES: Failed to acquire service start lock (Error %lu)\n",
dwError);
goto done;
}
@@ -326,7 +326,7 @@ wWinMain(HINSTANCE hInstance,
/* Signal start event */
SetEvent(hScmStartEvent);
- DPRINT("SERVICES: Initialized.\n");
+ DPRINT("SERVICES: Initialized\n");
/* Register event handler (used for system shutdown) */
SetConsoleCtrlHandler(ShutdownHandlerRoutine, TRUE);
@@ -351,7 +351,7 @@ wWinMain(HINSTANCE hInstance,
/* Initialization finished */
ScmInitialize = FALSE;
- DPRINT("SERVICES: Running.\n");
+ DPRINT("SERVICES: Running\n");
/* Wait until the shutdown event gets signaled */
WaitForSingleObject(hScmShutdownEvent, INFINITE);
@@ -378,7 +378,7 @@ done:
if (hScmStartEvent != NULL)
CloseHandle(hScmStartEvent);
- DPRINT("SERVICES: Finished.\n");
+ DPRINT("SERVICES: Finished\n");
ExitThread(0);
return 0;