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
F96301639: D30884.diff
Tue, Sep 24, 11:13 AM
Unknown Object (File)
Mon, Sep 16, 2:12 AM
Unknown Object (File)
Thu, Sep 12, 5:25 PM
Unknown Object (File)
Sun, Sep 8, 9:41 AM
Unknown Object (File)
Thu, Sep 5, 12:02 PM
Unknown Object (File)
Aug 18 2024, 5:09 PM
Unknown Object (File)
Aug 18 2024, 2:37 AM
Unknown Object (File)
Aug 14 2024, 2:23 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.