summaryrefslogtreecommitdiff
path: root/errlog.c
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2021-03-11 16:48:44 -0500
committerJavier Martinez Canillas <javier@dowhile0.org>2021-03-12 10:15:01 +0100
commit4457d79ce0ea638e7732f5529bf13849e290940d (patch)
tree5b931ef8fb3f2a641bc2732eb7821022cc897386 /errlog.c
parent3c00db33e53d0cab3b701c1569a79c64878f202d (diff)
downloadefi-boot-shim-4457d79ce0ea638e7732f5529bf13849e290940d.tar.gz
efi-boot-shim-4457d79ce0ea638e7732f5529bf13849e290940d.zip
More va_* work
Be much more explicit about exactly which va_* stuff comes from which ABI in both shim and gnu-efi. This fixes the problem where we see: | (null):0:(null)() v->name:"(null)" v->rtname:"(null)" | (null):0:(null)() v->data_size:0 v->data:0x0 and similar messages where everything is NULL. Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'errlog.c')
-rw-r--r--errlog.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/errlog.c b/errlog.c
index ac657151..cc6a89f5 100644
--- a/errlog.c
+++ b/errlog.c
@@ -11,25 +11,25 @@ static UINTN nerrs = 0;
EFI_STATUS EFIAPI
vdprint_(const CHAR16 *fmt, const char *file, int line, const char *func,
- va_list args)
+ ms_va_list args)
{
- va_list args2;
+ ms_va_list args2;
EFI_STATUS efi_status = EFI_SUCCESS;
if (verbose) {
- va_copy(args2, args);
+ ms_va_copy(args2, args);
console_print(L"%a:%d:%a() ", file, line, func);
efi_status = VPrint(fmt, args2);
- va_end(args2);
+ ms_va_end(args2);
}
return efi_status;
}
EFI_STATUS EFIAPI
VLogError(const char *file, int line, const char *func, const CHAR16 *fmt,
- va_list args)
+ ms_va_list args)
{
- va_list args2;
+ ms_va_list args2;
CHAR16 **newerrs;
newerrs = ReallocatePool(errs, (nerrs + 1) * sizeof(*errs),
@@ -40,11 +40,11 @@ VLogError(const char *file, int line, const char *func, const CHAR16 *fmt,
newerrs[nerrs] = PoolPrint(L"%a:%d %a() ", file, line, func);
if (!newerrs[nerrs])
return EFI_OUT_OF_RESOURCES;
- va_copy(args2, args);
+ ms_va_copy(args2, args);
newerrs[nerrs+1] = VPoolPrint(fmt, args2);
if (!newerrs[nerrs+1])
return EFI_OUT_OF_RESOURCES;
- va_end(args2);
+ ms_va_end(args2);
nerrs += 2;
newerrs[nerrs] = NULL;
@@ -56,12 +56,12 @@ VLogError(const char *file, int line, const char *func, const CHAR16 *fmt,
EFI_STATUS EFIAPI
LogError_(const char *file, int line, const char *func, const CHAR16 *fmt, ...)
{
- va_list args;
+ ms_va_list args;
EFI_STATUS efi_status;
- va_start(args, fmt);
+ ms_va_start(args, fmt);
efi_status = VLogError(file, line, func, fmt, args);
- va_end(args);
+ ms_va_end(args);
return efi_status;
}