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)
Fri, Apr 19, 6:37 PM
Unknown Object (File)
Sun, Apr 14, 5:42 PM
Unknown Object (File)
Sun, Apr 7, 11:37 PM
Unknown Object (File)
Sun, Apr 7, 2:04 PM
Unknown Object (File)
Mar 18 2024, 10:28 PM
Unknown Object (File)
Mar 18 2024, 9:21 PM
Unknown Object (File)
Mar 13 2024, 5:38 AM
Unknown Object (File)
Feb 28 2024, 10:18 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...