Page MenuHomeFreeBSD

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

Authored by olce on Aug 29 2025, 11:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Feb 10, 5:19 AM
Unknown Object (File)
Sun, Feb 8, 1:01 PM
Unknown Object (File)
Sat, Feb 7, 10:54 AM
Unknown Object (File)
Sat, Jan 31, 2:24 AM
Unknown Object (File)
Fri, Jan 30, 4:33 PM
Unknown Object (File)
Sat, Jan 24, 8:24 PM
Unknown Object (File)
Dec 12 2025, 12:55 PM
Unknown Object (File)
Nov 25 2025, 7:39 PM
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