MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / OcUnicodeSafeSPrint

Function OcUnicodeSafeSPrint

Library/OcStringLib/OcUnicodeLib.c:239–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237}
238
239EFI_STATUS
240EFIAPI
241OcUnicodeSafeSPrint (
242 OUT CHAR16 *StartOfBuffer,
243 IN UINTN BufferSize,
244 IN CONST CHAR16 *FormatString,
245 ...
246 )
247{
248 EFI_STATUS Status;
249 VA_LIST Marker;
250 VA_LIST Marker2;
251 UINTN NumberOfPrinted;
252
253 ASSERT (StartOfBuffer != NULL);
254 ASSERT (BufferSize > 0);
255 ASSERT (FormatString != NULL);
256
257 VA_START (Marker, FormatString);
258
259 VA_COPY (Marker2, Marker);
260 NumberOfPrinted = SPrintLength (FormatString, Marker2);
261 VA_END (Marker2);
262
263 if (BufferSize - 1 >= NumberOfPrinted) {
264 UnicodeVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);
265 Status = EFI_SUCCESS;
266 } else {
267 Status = EFI_OUT_OF_RESOURCES;
268 }
269
270 VA_END (Marker);
271
272 return Status;
273}

Callers

nothing calls this directly

Calls 2

SPrintLengthFunction · 0.50
UnicodeVSPrintFunction · 0.50

Tested by

no test coverage detected