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
Unknown Object (File)
Tue, Aug 25, 10:20 PM
Unknown Object (File)
Tue, Aug 25, 3:03 PM
Unknown Object (File)
Tue, Aug 25, 3:00 PM
Unknown Object (File)
Tue, Aug 25, 3:44 AM
Unknown Object (File)
Mon, Aug 24, 9:51 PM
Unknown Object (File)
Mon, Aug 24, 1:36 AM
Unknown Object (File)
Sun, Aug 23, 9:43 PM
Unknown Object (File)
Sun, Aug 23, 4:27 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