Date: Thu, 19 May 2016 16:36:06 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300216 - head/sys/boot/efi/loader Message-ID: <201605191636.u4JGa6xE025309@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Thu May 19 16:36:06 2016 New Revision: 300216 URL: https://svnweb.freebsd.org/changeset/base/300216 Log: Fix logic error so UEFI variables are reported correctly without error at the end. Modified: head/sys/boot/efi/loader/main.c Modified: head/sys/boot/efi/loader/main.c ============================================================================== --- head/sys/boot/efi/loader/main.c Thu May 19 16:28:05 2016 (r300215) +++ head/sys/boot/efi/loader/main.c Thu May 19 16:36:06 2016 (r300216) @@ -891,24 +891,26 @@ command_efi_printenv(int argc, char *arg */ varsz = nitems(varname); varname[0] = 0; - status = RS->GetNextVariableName(&varsz, varname, &varguid); - while (status != EFI_NOT_FOUND) { - status = RS->GetNextVariableName(&varsz, varname, - &varguid); + while ((status = RS->GetNextVariableName(&varsz, varname, &varguid)) != + EFI_NOT_FOUND) { if (aflag) { if (efi_print_var(varname, &varguid, lflag) != CMD_OK) break; continue; } if (vflag) { - if (wcscmp(varnamearg, varname) == 0) + if (wcscmp(varnamearg, varname) == 0) { if (efi_print_var(varname, &varguid, lflag) != CMD_OK) break; + continue; + } } if (gflag) { - if (memcmp(&varguid, &matchguid, sizeof(varguid)) == 0) + if (memcmp(&varguid, &matchguid, sizeof(varguid)) == 0) { if (efi_print_var(varname, &varguid, lflag) != CMD_OK) break; + continue; + } } } pager_close();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605191636.u4JGa6xE025309>