]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c
MdeModulePkg CapsuleApp: Add -NR (no-reset) option support
[mirror_edk2.git] / MdeModulePkg / Application / MemoryProfileInfo / MemoryProfileInfo.c
index 48d8f4657ba607fc9cdca11e7c3f7fc4321cb35c..338eb8191fa2ce4600720bd45dfc6fda4c4ed918 100644 (file)
@@ -27,7 +27,6 @@
 #include <Protocol/SmmCommunication.h>\r
 #include <Protocol/SmmAccess2.h>\r
 \r
-#include <Guid/ZeroGuid.h>\r
 #include <Guid/MemoryProfile.h>\r
 #include <Guid/PiSmmCommunicationRegionTable.h>\r
 \r
@@ -205,7 +204,7 @@ GetShortPdbFileName (
     StartIndex = 0;\r
     for (EndIndex = 0; PdbFileName[EndIndex] != 0; EndIndex++);\r
     for (IndexPdb = 0; PdbFileName[IndexPdb] != 0; IndexPdb++) {\r
-      if (PdbFileName[IndexPdb] == '\\') {\r
+      if ((PdbFileName[IndexPdb] == '\\') || (PdbFileName[IndexPdb] == '/')) {\r
         StartIndex = IndexPdb + 1;\r
       }\r
 \r
@@ -255,7 +254,7 @@ GetDriverNameString (
     return mNameString;\r
   }\r
 \r
-  if (!CompareGuid (&DriverInfo->FileName, &gZeroGuid)) {\r
+  if (!IsZeroGuid (&DriverInfo->FileName)) {\r
     //\r
     // Try to get the image's FFS UI section by image GUID\r
     //\r
@@ -344,16 +343,16 @@ ProfileActionToStr (
 \r
   if (IsForSmm) {\r
     ActionString = mSmmActionString;\r
-    ActionStringCount = sizeof (mSmmActionString) / sizeof (mSmmActionString[0]);\r
+    ActionStringCount = ARRAY_SIZE (mSmmActionString);\r
   } else {\r
     ActionString = mActionString;\r
-    ActionStringCount = sizeof (mActionString) / sizeof (mActionString[0]);\r
+    ActionStringCount = ARRAY_SIZE (mActionString);\r
   }\r
 \r
   if ((UINTN) (UINT32) Action < ActionStringCount) {\r
     return ActionString[Action];\r
   }\r
-  for (Index = 0; Index < sizeof (mExtActionString) / sizeof (mExtActionString[0]); Index++) {\r
+  for (Index = 0; Index < ARRAY_SIZE (mExtActionString); Index++) {\r
     if (mExtActionString[Index].Action == Action) {\r
       return mExtActionString[Index].String;\r
     }\r