Fix logic error so UEFI variables are reported correctly
without error at the end.
This commit is contained in:
parent
efc457e1bc
commit
da5d9ec2ac
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=300216
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user