Author: tfaber
Date: Sun Nov 2 07:17:39 2014
New Revision: 65178
URL:
http://svn.reactos.org/svn/reactos?rev=65178&view=rev
Log:
[SACDRV]
- Silence debug prints
- Avoid magic numbers
Modified:
trunk/reactos/drivers/sac/driver/concmd.c
trunk/reactos/drivers/sac/driver/conmgr.c
trunk/reactos/drivers/sac/driver/data.c
trunk/reactos/drivers/sac/driver/util.c
Modified: trunk/reactos/drivers/sac/driver/concmd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/sac/driver/concmd.…
==============================================================================
--- trunk/reactos/drivers/sac/driver/concmd.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/sac/driver/concmd.c [iso-8859-1] Sun Nov 2 07:17:39 2014
@@ -311,7 +311,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
{
/* 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 @@
{
/* 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 @@
PrintTListInfo(GlobalBuffer);
}
- SAC_DBG(1, "SAC DoTlistCommand: Exiting.\n");
-}
+ SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC DoTlistCommand: Exiting.\n");
+}
Modified: trunk/reactos/drivers/sac/driver/conmgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/sac/driver/conmgr.…
==============================================================================
--- trunk/reactos/drivers/sac/driver/conmgr.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/sac/driver/conmgr.c [iso-8859-1] Sun Nov 2 07:17:39 2014
@@ -458,7 +458,7 @@
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 @@
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))
{
Modified: trunk/reactos/drivers/sac/driver/data.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/sac/driver/data.c?…
==============================================================================
--- trunk/reactos/drivers/sac/driver/data.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/sac/driver/data.c [iso-8859-1] Sun Nov 2 07:17:39 2014
@@ -12,7 +12,7 @@
/* GLOBALS ********************************************************************/
-ULONG SACDebug = 0xFFFFFFFF;
+ULONG SACDebug = 0;
BOOLEAN CommandConsoleLaunchingEnabled;
BOOLEAN GlobalDataInitialized;
KMUTEX SACCMDEventInfoMutex;
@@ -100,7 +100,7 @@
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 @@
}
/* All done */
- SAC_DBG(1, "SAC FreeGlobalData: Exiting.\n");
+ SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC FreeGlobalData: Exiting.\n");
}
VOID
@@ -313,7 +313,7 @@
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 */
Modified: trunk/reactos/drivers/sac/driver/util.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/sac/driver/util.c?…
==============================================================================
--- trunk/reactos/drivers/sac/driver/util.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/sac/driver/util.c [iso-8859-1] Sun Nov 2 07:17:39 2014
@@ -434,7 +434,7 @@
*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 @@
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 */