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)
Sun, Apr 21, 9:48 AM
Unknown Object (File)
Thu, Mar 28, 3:47 PM
Unknown Object (File)
Mar 7 2024, 11:45 PM
Unknown Object (File)
Jan 14 2024, 7:10 AM
Unknown Object (File)
Jan 14 2024, 4:52 AM
Unknown Object (File)
Dec 23 2023, 1:05 AM
Unknown Object (File)
Nov 23 2023, 7:04 AM
Unknown Object (File)
Oct 19 2023, 4:50 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.