Page MenuHomeFreeBSD

loader/zfs: Fix to actually return the last error
Needs ReviewPublic

Authored by imp on Feb 27 2024, 5:54 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jul 11, 6:31 AM
Unknown Object (File)
Mon, Jul 8, 4:34 AM
Unknown Object (File)
Fri, Jun 28, 8:40 PM
Unknown Object (File)
Jun 5 2024, 4:26 PM
Unknown Object (File)
May 17 2024, 2:04 AM
Unknown Object (File)
May 4 2024, 1:18 PM
Unknown Object (File)
Apr 19 2024, 6:37 PM
Unknown Object (File)
Apr 14 2024, 5:42 PM
Subscribers

Details

Summary

The last fix, to try to return the last error, really returns the first
return code after the last error, which could be zero. Instead, return
the last error. Also, change rc to err to make it visually distinct from
rv, which is the cause of my error in e54bb0ad8058.

Reported by: Bill Sommerfeld
Fixes: e54bb0ad8058
Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 56257
Build 53145: arc lint + arc unit

Event Timeline

imp requested review of this revision.Feb 27 2024, 5:54 AM
stand/libsa/zfs/zfsimpl.c
1699

I'm not sure why the original code didn't return error here... we're returning the last error after trying everything, which likely is why...