diff options
author | imp <imp@FreeBSD.org> | 2016-05-19 16:36:06 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2016-05-19 16:36:06 +0000 |
commit | a13047440aeda52874854f5d5ad226ddd83f5eab (patch) | |
tree | 48ca36a23045f171ae5f906157aa7042f811bae9 /sys/boot/efi | |
parent | 40226afa3d061c832ec44b8b8fc03a8c3baa6f4f (diff) | |
download | FreeBSD-src-a13047440aeda52874854f5d5ad226ddd83f5eab.zip FreeBSD-src-a13047440aeda52874854f5d5ad226ddd83f5eab.tar.gz |
Fix logic error so UEFI variables are reported correctly
without error at the end.
Diffstat (limited to 'sys/boot/efi')
-rw-r--r-- | sys/boot/efi/loader/main.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/boot/efi/loader/main.c b/sys/boot/efi/loader/main.c index 5efe631..d2cba45 100644 --- a/sys/boot/efi/loader/main.c +++ b/sys/boot/efi/loader/main.c @@ -891,24 +891,26 @@ command_efi_printenv(int argc, char *argv[]) */ 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(); |