https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7d6bda16c61faac1ccf0c…
commit 7d6bda16c61faac1ccf0c1e0a3d26a3260ca9efd
Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr>
AuthorDate: Wed Jul 4 03:42:04 2018 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed Aug 8 22:03:45 2018 +0200
[REACTOS] Improve how some ASSERTMSG() message values are printed: enforce ending
"\n".
NB: Not touching calls in "third-party" code: class and classpnp.
---
base/system/smss/smss.c | 2 +-
boot/freeldr/freeldr/arch/i386/pcmem.c | 8 ++++----
drivers/bus/acpi/buspdo.c | 2 +-
drivers/bus/pcix/arb/tr_irq.c | 2 +-
drivers/bus/pcix/enum.c | 4 ++--
drivers/bus/pcix/intrface/agpintrf.c | 2 +-
drivers/bus/pcix/intrface/busintrf.c | 2 +-
drivers/bus/pcix/intrface/cardbus.c | 2 +-
drivers/bus/pcix/intrface/devhere.c | 2 +-
drivers/bus/pcix/intrface/lddintrf.c | 2 +-
drivers/bus/pcix/intrface/locintrf.c | 2 +-
drivers/bus/pcix/intrface/pmeintf.c | 2 +-
drivers/bus/pcix/intrface/routintf.c | 2 +-
drivers/bus/pcix/utils.c | 2 +-
modules/rostests/kmtests/npfs/NpfsHelpers.c | 4 ++--
ntoskrnl/config/cmconfig.c | 2 +-
ntoskrnl/config/cmparse.c | 3 ++-
ntoskrnl/config/cmvalche.c | 2 +-
ntoskrnl/ex/callback.c | 2 +-
ntoskrnl/include/internal/cm.h | 2 +-
ntoskrnl/po/power.c | 2 +-
sdk/lib/cmlib/cmlib.h | 2 +-
22 files changed, 28 insertions(+), 27 deletions(-)
diff --git a/base/system/smss/smss.c b/base/system/smss/smss.c
index 28bd66f22d..0da3fa6e74 100644
--- a/base/system/smss/smss.c
+++ b/base/system/smss/smss.c
@@ -70,7 +70,7 @@ SmpExecuteImage(IN PUNICODE_STRING FileName,
if (!NT_SUCCESS(Status))
{
/* This is a pretty bad failure. ASSERT on checked builds and exit */
- ASSERTMSG("RtlCreateProcessParameters", NT_SUCCESS(Status));
+ ASSERTMSG("RtlCreateProcessParameters failed.\n", NT_SUCCESS(Status));
DPRINT1("SMSS: RtlCreateProcessParameters failed for %wZ - Status ==
%lx\n",
FileName, Status);
return Status;
diff --git a/boot/freeldr/freeldr/arch/i386/pcmem.c
b/boot/freeldr/freeldr/arch/i386/pcmem.c
index 28d6e06e4c..21647d49a8 100644
--- a/boot/freeldr/freeldr/arch/i386/pcmem.c
+++ b/boot/freeldr/freeldr/arch/i386/pcmem.c
@@ -322,7 +322,7 @@ PcMemGetBiosMemoryMap(PFREELDR_MEMORY_DESCRIPTOR MemoryMap, ULONG
MaxMemoryMapSi
/* Warn user, unless wrong case is "first and not too big entry",
which is otherwise harmless. */
if (PcBiosMapCount > 0 || Regs.x.ecx > sizeof(BIOS_MEMORY_MAP))
{
- ASSERTMSG("Int 15h AX=E820h returned an invalid entry length!",
FALSE);
+ ASSERTMSG("Int 15h AX=E820h returned an invalid entry
length!\n", FALSE);
}
/* We keep previous entries (if any), but do not dare trying next entries.
* We assume these entries are good to use as is. If they are not, we are in
trouble...
@@ -360,7 +360,7 @@ PcMemGetBiosMemoryMap(PFREELDR_MEMORY_DESCRIPTOR MemoryMap, ULONG
MaxMemoryMapSi
PcBiosMemoryMap[PcBiosMapCount].Length,
PcBiosMemoryMap[PcBiosMapCount].Type,
PcBiosMemoryMap[PcBiosMapCount].ExtendedAttributesAsULONG);
- // NotWantedForPublicBuilds: ASSERTMSG("EA.ErrorLog = 1. Check/Report
then CONTinue.", FALSE);
+ // NotWantedForPublicBuilds: ASSERTMSG("EA.ErrorLog = 1. Check/Report
then CONTinue.\n", FALSE);
}
if (PcBiosMemoryMap[PcBiosMapCount].Length == 0)
@@ -433,7 +433,7 @@ PcMemGetBiosMemoryMap(PFREELDR_MEMORY_DESCRIPTOR MemoryMap, ULONG
MaxMemoryMapSi
{
ERR("PcMemoryMap is already full! (PcBiosMapCount = %lu, PcMapCount =
%lu (>= %lu))\n",
PcBiosMapCount, PcMapCount, MaxMemoryMapSize);
- // NotWantedForPublicBuilds: ASSERTMSG("PcMemoryMap is already
full!", FALSE);
+ // NotWantedForPublicBuilds: ASSERTMSG("PcMemoryMap is already
full!\n", FALSE);
/* We keep previous entries, and half-retrieve current/next entries.
* We assume all these entries are good to use as is. If they are not, we are
in trouble...
*
@@ -466,7 +466,7 @@ nextRange:
{
ERR("PcBiosMemoryMap is already full! (PcBiosMapCount = %lu (>= %lu),
PcMapCount = %lu)\n",
PcBiosMapCount, MAX_BIOS_DESCRIPTORS, PcMapCount);
- // NotWantedForPublicBuilds: ASSERTMSG("PcBiosMemoryMap is already
full!", FALSE);
+ // NotWantedForPublicBuilds: ASSERTMSG("PcBiosMemoryMap is already
full!\n", FALSE);
/* We keep retrieved entries, but ignore next entries.
* We assume these entries are good to use as is. If they are not, we are in
trouble...
*
diff --git a/drivers/bus/acpi/buspdo.c b/drivers/bus/acpi/buspdo.c
index 59a437e671..9abd48a2a8 100644
--- a/drivers/bus/acpi/buspdo.c
+++ b/drivers/bus/acpi/buspdo.c
@@ -1851,7 +1851,7 @@ Return Value:
// Only PDO can handle this request. Somebody above
// is not playing by rule.
//
- ASSERTMSG("Someone above is handling TargetDeviceRelation",
!deviceRelations);
+ ASSERTMSG("Someone above is handling TargetDeviceRelation\n",
!deviceRelations);
}
deviceRelations = ExAllocatePoolWithTag(PagedPool,
diff --git a/drivers/bus/pcix/arb/tr_irq.c b/drivers/bus/pcix/arb/tr_irq.c
index f6b393a913..87aa3bff69 100644
--- a/drivers/bus/pcix/arb/tr_irq.c
+++ b/drivers/bus/pcix/arb/tr_irq.c
@@ -36,7 +36,7 @@ tranirq_Initializer(IN PVOID Instance)
{
UNREFERENCED_PARAMETER(Instance);
/* PnP Interfaces don't get Initialized */
- ASSERTMSG("PCI tranirq_Initializer, unexpected call.", FALSE);
+ ASSERTMSG("PCI tranirq_Initializer, unexpected call.\n", FALSE);
return STATUS_UNSUCCESSFUL;
}
diff --git a/drivers/bus/pcix/enum.c b/drivers/bus/pcix/enum.c
index 8c4caa938a..edb8a261d9 100644
--- a/drivers/bus/pcix/enum.c
+++ b/drivers/bus/pcix/enum.c
@@ -1128,7 +1128,7 @@ PciSkipThisFunction(IN PPCI_COMMON_HEADER PciData,
else
{
/* Logic error in the driver */
- ASSERTMSG("PCI Skip Function - Operation type unknown.", FALSE);
+ ASSERTMSG("PCI Skip Function - Operation type unknown.\n", FALSE);
}
/* Check for legacy bridges during resource enumeration */
@@ -2172,7 +2172,7 @@ PciSetResources(IN PPCI_PDO_EXTENSION PdoExtension,
if (!PcipIsSameDevice(PdoExtension, &PciData))
{
/* Fail */
- ASSERTMSG("PCI Set resources - not same device", FALSE);
+ ASSERTMSG("PCI Set resources - not same device.\n", FALSE);
return STATUS_DEVICE_DOES_NOT_EXIST;
}
diff --git a/drivers/bus/pcix/intrface/agpintrf.c b/drivers/bus/pcix/intrface/agpintrf.c
index 89c25ec0d2..47dbd4132e 100644
--- a/drivers/bus/pcix/intrface/agpintrf.c
+++ b/drivers/bus/pcix/intrface/agpintrf.c
@@ -38,7 +38,7 @@ agpintrf_Initializer(IN PVOID Instance)
{
UNREFERENCED_PARAMETER(Instance);
/* PnP Interfaces don't get Initialized */
- ASSERTMSG("PCI agpintrf_Initializer, unexpected call.", FALSE);
+ ASSERTMSG("PCI agpintrf_Initializer, unexpected call.\n", FALSE);
return STATUS_UNSUCCESSFUL;
}
diff --git a/drivers/bus/pcix/intrface/busintrf.c b/drivers/bus/pcix/intrface/busintrf.c
index 93aecd322a..cf2d032910 100644
--- a/drivers/bus/pcix/intrface/busintrf.c
+++ b/drivers/bus/pcix/intrface/busintrf.c
@@ -36,7 +36,7 @@ busintrf_Initializer(IN PVOID Instance)
{
UNREFERENCED_PARAMETER(Instance);
/* PnP Interfaces don't get Initialized */
- ASSERTMSG("PCI busintrf_Initializer, unexpected call.", FALSE);
+ ASSERTMSG("PCI busintrf_Initializer, unexpected call.\n", FALSE);
return STATUS_UNSUCCESSFUL;
}
diff --git a/drivers/bus/pcix/intrface/cardbus.c b/drivers/bus/pcix/intrface/cardbus.c
index 63c2ce6a27..b549d8b480 100644
--- a/drivers/bus/pcix/intrface/cardbus.c
+++ b/drivers/bus/pcix/intrface/cardbus.c
@@ -100,7 +100,7 @@ pcicbintrf_Initializer(IN PVOID Instance)
{
UNREFERENCED_PARAMETER(Instance);
/* PnP Interfaces don't get Initialized */
- ASSERTMSG("PCI pcicbintrf_Initializer, unexpected call.", FALSE);
+ ASSERTMSG("PCI pcicbintrf_Initializer, unexpected call.\n", FALSE);
return STATUS_UNSUCCESSFUL;
}
diff --git a/drivers/bus/pcix/intrface/devhere.c b/drivers/bus/pcix/intrface/devhere.c
index 9d2566cf05..c0f81ab286 100644
--- a/drivers/bus/pcix/intrface/devhere.c
+++ b/drivers/bus/pcix/intrface/devhere.c
@@ -36,7 +36,7 @@ devpresent_Initializer(IN PVOID Instance)
{
UNREFERENCED_PARAMETER(Instance);
/* PnP Interfaces don't get Initialized */
- ASSERTMSG("PCI devpresent_Initializer, unexpected call.", FALSE);
+ ASSERTMSG("PCI devpresent_Initializer, unexpected call.\n", FALSE);
return STATUS_UNSUCCESSFUL;
}
diff --git a/drivers/bus/pcix/intrface/lddintrf.c b/drivers/bus/pcix/intrface/lddintrf.c
index 705c2c0a93..498bcfbb9e 100644
--- a/drivers/bus/pcix/intrface/lddintrf.c
+++ b/drivers/bus/pcix/intrface/lddintrf.c
@@ -36,7 +36,7 @@ lddintrf_Initializer(IN PVOID Instance)
{
UNREFERENCED_PARAMETER(Instance);
/* PnP Interfaces don't get Initialized */
- ASSERTMSG("PCI lddintrf_Initializer, unexpected call.", FALSE);
+ ASSERTMSG("PCI lddintrf_Initializer, unexpected call.\n", FALSE);
return STATUS_UNSUCCESSFUL;
}
diff --git a/drivers/bus/pcix/intrface/locintrf.c b/drivers/bus/pcix/intrface/locintrf.c
index 236b2be8eb..303dfcf6ff 100644
--- a/drivers/bus/pcix/intrface/locintrf.c
+++ b/drivers/bus/pcix/intrface/locintrf.c
@@ -36,7 +36,7 @@ locintrf_Initializer(IN PVOID Instance)
{
UNREFERENCED_PARAMETER(Instance);
/* PnP Interfaces don't get Initialized */
- ASSERTMSG("PCI locintrf_Initializer, unexpected call.", FALSE);
+ ASSERTMSG("PCI locintrf_Initializer, unexpected call.\n", FALSE);
return STATUS_UNSUCCESSFUL;
}
diff --git a/drivers/bus/pcix/intrface/pmeintf.c b/drivers/bus/pcix/intrface/pmeintf.c
index 2a6346a42b..dda75c08f8 100644
--- a/drivers/bus/pcix/intrface/pmeintf.c
+++ b/drivers/bus/pcix/intrface/pmeintf.c
@@ -36,7 +36,7 @@ PciPmeInterfaceInitializer(IN PVOID Instance)
{
UNREFERENCED_PARAMETER(Instance);
/* PnP Interfaces don't get Initialized */
- ASSERTMSG("PCI PciPmeInterfaceInitializer, unexpected call.", FALSE);
+ ASSERTMSG("PCI PciPmeInterfaceInitializer, unexpected call.\n", FALSE);
return STATUS_UNSUCCESSFUL;
}
diff --git a/drivers/bus/pcix/intrface/routintf.c b/drivers/bus/pcix/intrface/routintf.c
index e27b9bae85..7d0865bd79 100644
--- a/drivers/bus/pcix/intrface/routintf.c
+++ b/drivers/bus/pcix/intrface/routintf.c
@@ -38,7 +38,7 @@ routeintrf_Initializer(IN PVOID Instance)
{
UNREFERENCED_PARAMETER(Instance);
/* PnP Interfaces don't get Initialized */
- ASSERTMSG("PCI routeintrf_Initializer, unexpected call.", FALSE);
+ ASSERTMSG("PCI routeintrf_Initializer, unexpected call.\n", FALSE);
return STATUS_UNSUCCESSFUL;
}
diff --git a/drivers/bus/pcix/utils.c b/drivers/bus/pcix/utils.c
index e335a63de8..32a03339e6 100644
--- a/drivers/bus/pcix/utils.c
+++ b/drivers/bus/pcix/utils.c
@@ -494,7 +494,7 @@ PciGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject,
Status,
STATUS_BUFFER_TOO_SMALL);
*OutputBuffer = NULL;
- ASSERTMSG("PCI Successfully did the impossible!", FALSE);
+ ASSERTMSG("PCI Successfully did the impossible!\n", FALSE);
break;
}
diff --git a/modules/rostests/kmtests/npfs/NpfsHelpers.c
b/modules/rostests/kmtests/npfs/NpfsHelpers.c
index 3dc9267bf8..4ba7271792 100644
--- a/modules/rostests/kmtests/npfs/NpfsHelpers.c
+++ b/modules/rostests/kmtests/npfs/NpfsHelpers.c
@@ -105,7 +105,7 @@ NpCreatePipe(
ShareAccess = FILE_SHARE_READ | FILE_SHARE_WRITE;
else
{
- ASSERTMSG("Invalid NamedPipeConfiguration parameter value!", FALSE);
+ ASSERTMSG("Invalid NamedPipeConfiguration parameter value!\n", FALSE);
return STATUS_INVALID_PARAMETER_6;
}
@@ -192,7 +192,7 @@ NpOpenPipe(
ShareAccess = FILE_SHARE_READ | FILE_SHARE_WRITE;
else
{
- ASSERTMSG("Invalid NamedPipeConfiguration parameter value!", FALSE);
+ ASSERTMSG("Invalid NamedPipeConfiguration parameter value!\n", FALSE);
return STATUS_INVALID_PARAMETER_3;
}
diff --git a/ntoskrnl/config/cmconfig.c b/ntoskrnl/config/cmconfig.c
index 9da721e241..97b81d682e 100644
--- a/ntoskrnl/config/cmconfig.c
+++ b/ntoskrnl/config/cmconfig.c
@@ -153,7 +153,7 @@ CmpInitializeRegistryNode(IN PCONFIGURATION_COMPONENT_DATA
CurrentEntry,
FIELD_OFFSET(CM_FULL_RESOURCE_DESCRIPTOR, PartialResourceList);
if (Length > CmpConfigurationAreaSize)
{
- ASSERTMSG("Component too large -- need reallocation!", FALSE);
+ ASSERTMSG("Component too large -- need reallocation!\n", FALSE);
}
else
{
diff --git a/ntoskrnl/config/cmparse.c b/ntoskrnl/config/cmparse.c
index 44525de2c0..fe25e252bd 100644
--- a/ntoskrnl/config/cmparse.c
+++ b/ntoskrnl/config/cmparse.c
@@ -1097,7 +1097,8 @@ CmpParseKey(IN PVOID ParseObject,
ASSERT(ParentKcb != NULL);
/* Check if everything was found cached */
- if (!TotalRemainingSubkeys) ASSERTMSG("Caching not implemented", FALSE);
+ if (!TotalRemainingSubkeys)
+ ASSERTMSG("Caching not implemented\n", FALSE);
/* Don't do anything if we're being deleted */
if (Kcb->Delete)
diff --git a/ntoskrnl/config/cmvalche.c b/ntoskrnl/config/cmvalche.c
index 03d6c8bede..7759b7c646 100644
--- a/ntoskrnl/config/cmvalche.c
+++ b/ntoskrnl/config/cmvalche.c
@@ -35,7 +35,7 @@ CmpSetValueCached(IN PHCELL_INDEX CellIndex)
}
#define ASSERT_VALUE_CACHE() \
- ASSERTMSG("Cached Values Not Yet Supported!", FALSE);
+ ASSERTMSG("Cached Values Not Yet Supported!\n", FALSE);
/* FUNCTIONS *****************************************************************/
diff --git a/ntoskrnl/ex/callback.c b/ntoskrnl/ex/callback.c
index 6ef87970a0..07b1d50b2a 100644
--- a/ntoskrnl/ex/callback.c
+++ b/ntoskrnl/ex/callback.c
@@ -183,7 +183,7 @@ ExCompareExchangeCallBack(IN OUT PEX_CALLBACK CallBack,
MAX_FAST_REFS + 1))
{
/* This should never happen */
- ASSERTMSG("Callback block is already undergoing rundown", FALSE);
+ ASSERTMSG("Callback block is already undergoing rundown\n",
FALSE);
return FALSE;
}
}
diff --git a/ntoskrnl/include/internal/cm.h b/ntoskrnl/include/internal/cm.h
index 2a6f980204..a3f801df1f 100644
--- a/ntoskrnl/include/internal/cm.h
+++ b/ntoskrnl/include/internal/cm.h
@@ -40,7 +40,7 @@
// Hack since bigkeys are not yet supported
//
#define ASSERT_VALUE_BIG(h, s) \
- ASSERTMSG("Big keys not supported!", !CmpIsKeyValueBig(h, s));
+ ASSERTMSG("Big keys not supported!\n", !CmpIsKeyValueBig(h, s));
//
// CM_KEY_CONTROL_BLOCK Signatures
diff --git a/ntoskrnl/po/power.c b/ntoskrnl/po/power.c
index 2dee988b34..c34a660c86 100644
--- a/ntoskrnl/po/power.c
+++ b/ntoskrnl/po/power.c
@@ -991,7 +991,7 @@ NtSetSystemPowerState(IN POWER_ACTION SystemAction,
}
/* You should not have made it this far */
- // ASSERTMSG("System is still up and running?!", FALSE);
+ // ASSERTMSG("System is still up and running?!\n", FALSE);
DPRINT1("System is still up and running, you may not have chosen a yet
supported power option: %u\n", PopAction.Action);
break;
}
diff --git a/sdk/lib/cmlib/cmlib.h b/sdk/lib/cmlib/cmlib.h
index e49bd38462..46676a2122 100644
--- a/sdk/lib/cmlib/cmlib.h
+++ b/sdk/lib/cmlib/cmlib.h
@@ -313,7 +313,7 @@ extern ULONG CmlibTraceLevel;
// Hack since bigkeys are not yet supported
//
#define ASSERT_VALUE_BIG(h, s) \
- ASSERTMSG("Big keys not supported!", !CmpIsKeyValueBig(h, s));
+ ASSERTMSG("Big keys not supported!\n", !CmpIsKeyValueBig(h, s));
//
// Returns whether or not this is a small valued key