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 https://github.com/rhinstaller/efibootmgr/issues/54
Fixes https://bugs.gentoo.org/show_bug.cgi?id=591864
Signed-off-by: Peter Jones <pjones@redhat.com>
}
} 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;
+ }
}
}
}