Skip to content

Commit

Permalink
libefivar/libs.c:probe(): Fix the case where the first probe fails.
Browse files Browse the repository at this point in the history
When adding efi_set_error() support, I accidentally changed it to treat
a probe failure as a success, which winds up meaning you always try
efivarfs even if the probe failed.

Fixes github issue rhboot/efibootmgr#54
Fixes https://bugs.gentoo.org/show_bug.cgi?id=591864

Signed-off-by: Peter Jones <[email protected]>
  • Loading branch information
vathpela committed Sep 13, 2016
1 parent cae4809 commit e8299c8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,13 @@ libefivar_init(void)
}
} else {
int rc = ops_list[i]->probe();
if (rc <= 0)
if (rc <= 0) {
efi_error("ops_list[%d]->probe() failed", i);
else
} else {
efi_error_clear();

ops = ops_list[i];
break;
ops = ops_list[i];
break;
}
}
}
}

0 comments on commit e8299c8

Please sign in to comment.