[REACTOS] Improve how some ASSERTMSG() message values are printed: enforce ending... 660/head
authorSerge Gautherie <reactos-git_serge_171003@gautherie.fr>
Wed, 4 Jul 2018 01:42:04 +0000 (03:42 +0200)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Wed, 8 Aug 2018 20:03:45 +0000 (22:03 +0200)
NB: Not touching calls in "third-party" code: class and classpnp.

22 files changed:
base/system/smss/smss.c
boot/freeldr/freeldr/arch/i386/pcmem.c
drivers/bus/acpi/buspdo.c
drivers/bus/pcix/arb/tr_irq.c
drivers/bus/pcix/enum.c
drivers/bus/pcix/intrface/agpintrf.c
drivers/bus/pcix/intrface/busintrf.c
drivers/bus/pcix/intrface/cardbus.c
drivers/bus/pcix/intrface/devhere.c
drivers/bus/pcix/intrface/lddintrf.c
drivers/bus/pcix/intrface/locintrf.c
drivers/bus/pcix/intrface/pmeintf.c
drivers/bus/pcix/intrface/routintf.c
drivers/bus/pcix/utils.c
modules/rostests/kmtests/npfs/NpfsHelpers.c
ntoskrnl/config/cmconfig.c
ntoskrnl/config/cmparse.c
ntoskrnl/config/cmvalche.c
ntoskrnl/ex/callback.c
ntoskrnl/include/internal/cm.h
ntoskrnl/po/power.c
sdk/lib/cmlib/cmlib.h

index 28bd66f..0da3fa6 100644 (file)
@@ -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;
index 28d6e06..21647d4 100644 (file)
@@ -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...
          *
index 59a437e..9abd48a 100644 (file)
@@ -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,
index f6b393a..87aa3bf 100644 (file)
@@ -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;
 }
 
index 8c4caa9..edb8a26 100644 (file)
@@ -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;
     }
 
index 89c25ec..47dbd41 100644 (file)
@@ -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;
 }
 
index 93aecd3..cf2d032 100644 (file)
@@ -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;
 }
 
index 63c2ce6..b549d8b 100644 (file)
@@ -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;
 }
 
index 9d2566c..c0f81ab 100644 (file)
@@ -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;
 }
 
index 705c2c0..498bcfb 100644 (file)
@@ -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;
 }
 
index 236b2be..303dfcf 100644 (file)
@@ -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;
 }
 
index 2a6346a..dda75c0 100644 (file)
@@ -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;
 }
 
index e27b9ba..7d0865b 100644 (file)
@@ -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;
 }
 
index e335a63..32a0333 100644 (file)
@@ -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;
         }
 
index 3dc9267..4ba7271 100644 (file)
@@ -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;
     }
 
index 9da721e..97b81d6 100644 (file)
@@ -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
         {
index 44525de..fe25e25 100644 (file)
@@ -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)
index 03d6c8b..7759b7c 100644 (file)
@@ -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 *****************************************************************/
 
index 6ef8797..07b1d50 100644 (file)
@@ -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;
         }
     }
index 2a6f980..a3f801d 100644 (file)
@@ -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
index 2dee988..c34a660 100644 (file)
@@ -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;
     }
index e49bd38..46676a2 100644 (file)
@@ -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