Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/stand/efiboot efirng: fix va_num arg to uefi_call_wrappe...



details:   https://anonhg.NetBSD.org/src/rev/b1bca8ea841d
branches:  trunk
changeset: 379855:b1bca8ea841d
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Tue Jun 22 10:19:35 2021 +0000

description:
efirng: fix va_num arg to uefi_call_wrapper for GetRNG calls

As far as I can tell this param isn't actually used, but it is supposed to
be the number of arguments passed to the called method.

diffstat:

 sys/stand/efiboot/efirng.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r e985276dd033 -r b1bca8ea841d sys/stand/efiboot/efirng.c
--- a/sys/stand/efiboot/efirng.c        Tue Jun 22 07:49:58 2021 +0000
+++ b/sys/stand/efiboot/efirng.c        Tue Jun 22 10:19:35 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: efirng.c,v 1.2 2020/05/14 23:09:29 jmcneill Exp $      */
+/*     $NetBSD: efirng.c,v 1.3 2021/06/22 10:19:35 jmcneill Exp $      */
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -121,14 +121,14 @@ efi_rng(void *buf, UINTN len)
        if (!efi_rng_available())
                return EIO;
 
-       status = uefi_call_wrapper(rng->GetRNG, 3, rng, &RngAlgorithmRawGuid,
+       status = uefi_call_wrapper(rng->GetRNG, 4, rng, &RngAlgorithmRawGuid,
            len, buf);
        if (status == EFI_UNSUPPORTED) {
                /*
                 * Fall back to any supported RNG `algorithm' even
                 * though we would prefer raw samples.
                 */
-               status = uefi_call_wrapper(rng->GetRNG, 3, rng, NULL, len, buf);
+               status = uefi_call_wrapper(rng->GetRNG, 4, rng, NULL, len, buf);
        }
        if (EFI_ERROR(status)) {
                DPRINT(L"efirng: GetRNG: %r\n", status);



Home | Main Index | Thread Index | Old Index