Page MenuHomeFreeBSD

loader/zfs: Fix to actually return the last error
ClosedPublic

Authored by imp on Feb 27 2024, 5:54 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 22, 9:46 AM
Unknown Object (File)
Tue, Oct 22, 9:46 AM
Unknown Object (File)
Tue, Oct 22, 9:34 AM
Unknown Object (File)
Oct 4 2024, 1:53 AM
Unknown Object (File)
Oct 2 2024, 12:02 PM
Unknown Object (File)
Oct 1 2024, 12:47 PM
Unknown Object (File)
Sep 28 2024, 1:29 AM
Unknown Object (File)
Sep 26 2024, 6:22 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...

525e6d6c890f6aee898ac70347e5bb49da6638a1 landed this, or something substantially similar.

This revision is now accepted and ready to land.Jul 30 2024, 5:23 AM