Page MenuHomeFreeBSD

linux: getsockopt(): Simplify exporting groups a bit
ClosedPublic

Authored by olce on Aug 29 2025, 11:04 PM.
Tags
None
Referenced Files
F132065293: D52280.id162247.diff
Mon, Oct 13, 8:43 AM
Unknown Object (File)
Sun, Oct 12, 8:21 PM
Unknown Object (File)
Sun, Oct 12, 8:21 PM
Unknown Object (File)
Sun, Oct 12, 8:45 AM
Unknown Object (File)
Sat, Oct 4, 6:56 PM
Unknown Object (File)
Thu, Sep 25, 6:28 PM
Unknown Object (File)
Thu, Sep 25, 10:44 AM
Unknown Object (File)
Wed, Sep 24, 2:15 AM
Subscribers

Details

Summary

No functional change (intended).

Go through conversion to a 'l_gid_t' before copying out in order to cope
with differing group types (except for not representable values, of
course). This is what is done, e.g., for getgroups() in 'linux_misc.c'.
As Linux's group type is the same as ours on all architectures, we could
as well just stop bothering and copy out our memory representation,
eliminating the loop here. Whatever the choice, though, it has to be
consistent here and there.

Introduce 'out' of type 'l_gid_t' to avoid performing "by hand" array
arithmetics when copying out.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable