Page MenuHomeFreeBSD

cam: change xpt_clone_path to return int
ClosedPublic

Authored by imp on Jun 24 2021, 4:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 30, 11:49 AM
Unknown Object (File)
Sep 24 2024, 11:13 AM
Unknown Object (File)
Sep 16 2024, 2:12 AM
Unknown Object (File)
Sep 12 2024, 5:25 PM
Unknown Object (File)
Sep 8 2024, 9:41 AM
Unknown Object (File)
Sep 5 2024, 12:02 PM
Unknown Object (File)
Aug 18 2024, 5:09 PM
Unknown Object (File)
Aug 18 2024, 2:37 AM
Subscribers
None

Details

Summary

xpt_clone_path originally returned a cam_status, but it doesn't do I/O
and should return an errno instead. I added it last year and it's only
used in one place. It's not yet documented, so no doc changes are
needed.

Sponsored by: Netflix

Test Plan

Based on Scott's comments on other reviews, make this fit the pattern of returning errno rather than cam_status.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 40076
Build 36965: arc lint + arc unit

Event Timeline

imp requested review of this revision.Jun 24 2021, 4:59 PM
imp added reviewers: scottl, mav.
This revision is now accepted and ready to land.Jun 24 2021, 5:04 PM

Though it is confusing for xpt_compile_path() and xpt_clone_path() have different return codes.

In D30884#694774, @mav wrote:

Though it is confusing for xpt_compile_path() and xpt_clone_path() have different return codes.

xpt_compile_path is used internally to CAM in 9 places. It's a good candidate as well, so I'll change that too.
Good observation.

In D30884#694775, @imp wrote:

xpt_compile_path is used internally to CAM in 9 places. It's a good candidate as well, so I'll change that too.

Although not used in a lot of places, it is used by xpt_create_path which does return a cam_status and is used in a bunch of SIMs, so some care would need to be undertaken to convert that... Either way, I'll followup with a subsequent review.

This revision was automatically updated to reflect the committed changes.