- Silence debug prints
- Avoid magic numbers

svn path=/trunk/; revision=65178
This commit is contained in:
Thomas Faber 2014-11-02 07:17:39 +00:00
parent a899cf5bdd
commit db79c779e8
4 changed files with 25 additions and 25 deletions

View file

@ -311,7 +311,7 @@ VOID
NTAPI
PrintTListInfo(IN PSAC_SYSTEM_INFORMATION SacInfo)
{
SAC_DBG(1, "Testing: %d %d %I64d\n",
SAC_DBG(SAC_DBG_ENTRY_EXIT, "Testing: %d %d %I64d\n",
SacInfo->BasicInfo.NumberOfPhysicalPages,
SacInfo->PerfInfo.AvailablePages,
SacInfo->TimeInfo.BootTime);
@ -357,7 +357,7 @@ DoRebootCommand(IN BOOLEAN Reboot)
LARGE_INTEGER Timeout, TickCount;
NTSTATUS Status;
KEVENT Event;
SAC_DBG(1, "SAC DoRebootCommand: Entering.\n");
SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC DoRebootCommand: Entering.\n");
/* Get the current time now, and setup a timeout in 1 second */
KeQueryTickCount(&TickCount);
@ -430,42 +430,42 @@ VOID
NTAPI
DoSetTimeCommand(IN PCHAR InputTime)
{
SAC_DBG(1, "Entering\n");
SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n");
}
VOID
NTAPI
DoKillCommand(IN PCHAR KillString)
{
SAC_DBG(1, "Entering\n");
SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n");
}
VOID
NTAPI
DoLowerPriorityCommand(IN PCHAR PrioString)
{
SAC_DBG(1, "Entering\n");
SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n");
}
VOID
NTAPI
DoRaisePriorityCommand(IN PCHAR PrioString)
{
SAC_DBG(1, "Entering\n");
SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n");
}
VOID
NTAPI
DoLimitMemoryCommand(IN PCHAR LimitString)
{
SAC_DBG(1, "Entering\n");
SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n");
}
VOID
NTAPI
DoCrashCommand(VOID)
{
SAC_DBG(1, "SAC DoCrashCommand: Entering.\n");
SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC DoCrashCommand: Entering.\n");
/* Crash the machine */
KeBugCheckEx(MANUALLY_INITIATED_CRASH, 0, 0, 0, 0);
@ -476,28 +476,28 @@ VOID
NTAPI
DoMachineInformationCommand(VOID)
{
SAC_DBG(1, "Entering\n");
SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n");
}
VOID
NTAPI
DoChannelCommand(IN PCHAR ChannelString)
{
SAC_DBG(1, "Entering\n");
SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n");
}
VOID
NTAPI
DoCmdCommand(IN PCHAR InputString)
{
SAC_DBG(1, "Entering\n");
SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n");
}
VOID
NTAPI
DoLockCommand(VOID)
{
SAC_DBG(1, "Entering\n");
SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n");
}
FORCEINLINE
@ -556,14 +556,14 @@ VOID
NTAPI
DoGetNetInfo(IN BOOLEAN DoPrint)
{
SAC_DBG(1, "Entering\n");
SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n");
}
VOID
NTAPI
DoSetIpAddressCommand(IN PCHAR IpString)
{
SAC_DBG(1, "Entering\n");
SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n");
}
VOID
@ -589,7 +589,7 @@ DoTlistCommand(VOID)
{
/* Out of memory, bail out */
SacPutSimpleMessage(11);
SAC_DBG(1, "SAC DoTlistCommand: Exiting.\n");
SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC DoTlistCommand: Exiting.\n");
return;
}
}
@ -613,7 +613,7 @@ DoTlistCommand(VOID)
{
/* Out of memory, bail out */
SacPutSimpleMessage(11);
SAC_DBG(1, "SAC DoTlistCommand: Exiting.\n");
SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC DoTlistCommand: Exiting.\n");
return;
}
@ -637,5 +637,5 @@ DoTlistCommand(VOID)
PrintTListInfo(GlobalBuffer);
}
SAC_DBG(1, "SAC DoTlistCommand: Exiting.\n");
SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC DoTlistCommand: Exiting.\n");
}

View file

@ -458,7 +458,7 @@ ConMgrProcessInputLine(VOID)
BOOLEAN EnablePaging;
NTSTATUS Status;
SAC_DBG(4, "SAC Input Test: %s\n", InputBuffer);
SAC_DBG(SAC_DBG_INIT, "SAC Input Test: %s\n", InputBuffer);
if (!strncmp(InputBuffer, "t", 1))
{
@ -508,7 +508,7 @@ ConMgrProcessInputLine(VOID)
sizeof(EnablePaging),
NULL,
0);
if (!NT_SUCCESS(Status)) SAC_DBG(4, "SAC Display Log failed.\n");
if (!NT_SUCCESS(Status)) SAC_DBG(SAC_DBG_INIT, "SAC Display Log failed.\n");
}
else if (!strncmp(InputBuffer, "cmd", 3))
{

View file

@ -12,7 +12,7 @@
/* GLOBALS ********************************************************************/
ULONG SACDebug = 0xFFFFFFFF;
ULONG SACDebug = 0;
BOOLEAN CommandConsoleLaunchingEnabled;
BOOLEAN GlobalDataInitialized;
KMUTEX SACCMDEventInfoMutex;
@ -100,7 +100,7 @@ NTAPI
FreeGlobalData(VOID)
{
UNICODE_STRING SymbolicLink;
SAC_DBG(1, "SAC FreeGlobalData: Entering.\n");
SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC FreeGlobalData: Entering.\n");
/* Only free if we allocated */
if (GlobalDataInitialized)
@ -139,7 +139,7 @@ FreeGlobalData(VOID)
}
/* All done */
SAC_DBG(1, "SAC FreeGlobalData: Exiting.\n");
SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC FreeGlobalData: Exiting.\n");
}
VOID
@ -313,7 +313,7 @@ InitializeDeviceData(IN PDEVICE_OBJECT DeviceObject)
if (!NT_SUCCESS(Status))
{
/* For debugging, write down why we failed */
SAC_DBG(1, "Exiting (6) with status FALSE\n");
SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting (6) with status FALSE\n");
DeviceExtension->PriorityFail = TRUE;
/* Initialize rundown and wait for the thread to do it */

View file

@ -434,7 +434,7 @@ GetRegistryValueBuffer(IN PCWSTR KeyName,
*Buffer = SacAllocatePool(ResultLength, GLOBAL_BLOCK_TAG);
if (!*Buffer)
{
SAC_DBG(1, "SAC GetRegistryValueBuffer: failed allocation\n");
SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC GetRegistryValueBuffer: failed allocation\n");
return Status;
}
@ -497,7 +497,7 @@ SetRegistryValue(IN PCWSTR KeyName,
if (!NT_SUCCESS(Status))
{
/* Print error on failure */
SAC_DBG(1, "SAC SetRegistryValue: failed ZwSetValueKey: %X.\n", Status);
SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC SetRegistryValue: failed ZwSetValueKey: %X.\n", Status);
}
/* Close the handle and exit */