mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-12-12 14:36:56 +01:00
16c627596f
Fixed some icons ordering in main menu. Fixed macOs version detection for custom entries. Fixed main Big Sur partition appearing in menu. Refactor IsValidGuidAsciiString.
26 lines
506 B
C
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.
|
|
}
|