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)
Fri, Oct 4, 1:53 AM
Unknown Object (File)
Wed, Oct 2, 12:02 PM
Unknown Object (File)
Tue, Oct 1, 12:47 PM
Unknown Object (File)
Sat, Sep 28, 1:29 AM
Unknown Object (File)
Thu, Sep 26, 6:22 PM
Unknown Object (File)
Fri, Sep 20, 6:27 AM
Unknown Object (File)
Fri, Sep 20, 3:40 AM
Unknown Object (File)
Sep 15 2024, 6:09 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