Page MenuHomeFreeBSD

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

Authored by olce on Aug 29 2025, 11:04 PM.
Tags
None
Referenced Files
F162630406: D52280.diff
Wed, Jul 15, 6:41 AM
F162630405: D52280.diff
Wed, Jul 15, 6:41 AM
Unknown Object (File)
Tue, Jul 14, 6:03 PM
Unknown Object (File)
Tue, Jun 30, 4:14 AM
Unknown Object (File)
Tue, Jun 30, 4:14 AM
Unknown Object (File)
Mon, Jun 29, 4:27 PM
Unknown Object (File)
Wed, Jun 24, 5:42 PM
Unknown Object (File)
Wed, Jun 24, 1:29 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