From db79c779e8c9bdc4390d1743ed234e5223ffbc66 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Sun, 2 Nov 2014 07:17:39 +0000 Subject: [PATCH] [SACDRV] - Silence debug prints - Avoid magic numbers svn path=/trunk/; revision=65178 --- reactos/drivers/sac/driver/concmd.c | 34 ++++++++++++++--------------- reactos/drivers/sac/driver/conmgr.c | 4 ++-- reactos/drivers/sac/driver/data.c | 8 +++---- reactos/drivers/sac/driver/util.c | 4 ++-- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/reactos/drivers/sac/driver/concmd.c b/reactos/drivers/sac/driver/concmd.c index 252273afab2..4ec8725e5b0 100644 --- a/reactos/drivers/sac/driver/concmd.c +++ b/reactos/drivers/sac/driver/concmd.c @@ -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"); } diff --git a/reactos/drivers/sac/driver/conmgr.c b/reactos/drivers/sac/driver/conmgr.c index fd738836074..ffc4b9de658 100644 --- a/reactos/drivers/sac/driver/conmgr.c +++ b/reactos/drivers/sac/driver/conmgr.c @@ -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)) { diff --git a/reactos/drivers/sac/driver/data.c b/reactos/drivers/sac/driver/data.c index 43e2292eae2..3dcb70ef429 100644 --- a/reactos/drivers/sac/driver/data.c +++ b/reactos/drivers/sac/driver/data.c @@ -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 */ diff --git a/reactos/drivers/sac/driver/util.c b/reactos/drivers/sac/driver/util.c index 06738ea358b..64fd88ecbe0 100644 --- a/reactos/drivers/sac/driver/util.c +++ b/reactos/drivers/sac/driver/util.c @@ -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 */