Page MenuHomeFreeBSD

unix: rename unp_connectat_peer() to unp_resolve_peer()
AcceptedPublic

Authored by inquire_JohnEricson.me on Mon, Aug 10, 8:44 PM.
Tags
None
Referenced Files
F167208644: D58768.diff
Wed, Aug 19, 11:15 PM
F167187747: D58768.id183824.diff
Wed, Aug 19, 6:11 PM
F167185051: D58768.id.diff
Wed, Aug 19, 5:32 PM
F167136040: D58768.diff
Wed, Aug 19, 9:40 AM
Unknown Object (File)
Tue, Aug 18, 10:28 PM
Unknown Object (File)
Tue, Aug 18, 8:10 PM
Unknown Object (File)
Tue, Aug 18, 2:00 PM
Unknown Object (File)
Tue, Aug 18, 1:43 PM
Subscribers

Details

Reviewers
markj
glebius
Summary

Somehow I ended up with making the very similarly named
unp_connectat_peer() and unp_connect_peer(), but the functions are
not similar at all!

unp_connectat_peer() connects nothing: it turns a descriptor and a
pathname into a referenced peer socket. It is the one that never should
have had that name. The other one actually does connect, and therefore
deserves it.

(Presumably at some point me or the LLM got confused whether the naming
reflected what we were doing ("connecting"), or who was calling us
("connectat").)

The new name also sits better beside the helpers it dispatches to,
unp_socket_fd_peer(), unp_dupfd_peer() and unp_vnode_peer(), which
are likewise named for what they resolve from.

While here, fix the comment: it described 'buf' as "null when len == 0",
but an empty path is an empty string, not a NULL pointer.

No functional change intended.

Signed-off-by: John Ericson <John.Ericson@Obsidian.Systems>
Assisted-by: Claude Code (Claude Opus 5)

Diff Detail

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