Page MenuHomeFreeBSD

ctl: add a new error type to distinguish EINVAL vs. EEXIST
Needs ReviewPublic

Authored by kevans on Apr 21 2026, 4:41 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 15, 11:16 AM
Unknown Object (File)
Thu, May 14, 6:17 PM
Unknown Object (File)
Tue, May 12, 9:01 AM
Unknown Object (File)
Tue, May 12, 6:47 AM
Unknown Object (File)
Tue, May 12, 6:47 AM
Unknown Object (File)
Tue, May 5, 10:27 AM
Unknown Object (File)
Tue, May 5, 9:16 AM
Unknown Object (File)
Sun, May 3, 9:07 PM
Subscribers

Details

Reviewers
asomers
jhb
Group Reviewers
cam
Summary

For port creation requests, CTL_LUN_ERROR will almost always effectively
be EINVAL, with one exception: attempting to add a port that already
exists.

Add a new error type to distinguish between the two, which maintains
the same semantics (setting the error string) for applications that
don't actually care about the differnce between the error types.

This will be used to surface an EEXIST in ctld so that we can proceed
with updating the port.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 72389
Build 69272: arc lint + arc unit