HomeFreeBSD

efibootmgr: fix an incorrect error handling check

Description

efibootmgr: fix an incorrect error handling check

efivar_device_path_to_unix_path() returns standard error codes on
failure and zero on success. Checking for a return value less than zero
means that the actual failure cases won't be handled. This could
manifest as a segfault during the subsequent call to printf().

Reviewed by: imp
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D27424

Details

Provenance
mhorneAuthored on
Reviewer
imp
Differential Revision
D27424: efibootmgr: fix an incorrect error handling check
Parents
rS368199: Move inner loop logic out of sysctl_sysctl_next_ls().
Branches
Unknown
Tags
Unknown