[edk2] [PATCH 6/7] MdeModulePkg/PrintLib: Add deprecated flag for APIs [A|U]ValueToString

Hao Wu posted 7 patches 7 years, 8 months ago
[edk2] [PATCH 6/7] MdeModulePkg/PrintLib: Add deprecated flag for APIs [A|U]ValueToString
Posted by Hao Wu 7 years, 8 months ago
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
 MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c b/MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c
index 589d4db..434736f 100644
--- a/MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c
+++ b/MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c
@@ -598,7 +598,11 @@ UnicodeSPrintAsciiFormat (
   return NumberOfPrinted;
 }
 
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
+
 /**
+  [ATTENTION] This function is deprecated for security reason.
+
   Converts a decimal value to a Null-terminated Unicode string.
   
   Converts the decimal number specified by Value to a Null-terminated Unicode 
@@ -665,6 +669,8 @@ UnicodeValueToString (
   return StrnLenS (Buffer, BufferSize / sizeof (CHAR16));
 }
 
+#endif
+
 /**
   Converts a decimal value to a Null-terminated Unicode string.
 
@@ -1071,7 +1077,11 @@ AsciiSPrintUnicodeFormat (
 }
 
 
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
+
 /**
+  [ATTENTION] This function is deprecated for security reason.
+
   Converts a decimal value to a Null-terminated ASCII string.
   
   Converts the decimal number specified by Value to a Null-terminated ASCII string 
@@ -1137,6 +1147,8 @@ AsciiValueToString (
   return AsciiStrnLenS (Buffer, BufferSize / sizeof (CHAR8));
 }
 
+#endif
+
 /**
   Converts a decimal value to a Null-terminated Ascii string.
 
-- 
1.9.5.msysgit.0

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel