CloverBootloader/Xcode/cpp_tests/Include/Library/PrintLib.c
jief666 16c627596f Rename OSVersion to macOSVersion.
Fixed some icons ordering in main menu.
Fixed macOs version detection for custom entries.
Fixed main Big Sur partition appearing in menu.
Refactor IsValidGuidAsciiString.
2021-01-31 12:50:23 +03:00

26 lines
506 B
C

//
// PrintLib.c
// cpp_tests
//
// Created by Jief on 30/01/2021.
// Copyright © 2021 JF Knudsen. All rights reserved.
//
#include "PrintLib.h"
UINTN
EFIAPI
AsciiSPrint (
OUT CHAR8 *StartOfBuffer,
IN UINTN BufferSize,
IN CONST CHAR8 *FormatString,
...
)
{
va_list va;
va_start(va, FormatString);
int ret = vsnprintf(StartOfBuffer, BufferSize, FormatString, va);
va_end(va);
return (UINTN)ret; // vsnprintf seems to always return >= 0. So cast should be safe.
}