Re: [PATCH 02/18] flag parameters: socket and socketpair

YOSHIFUJI Hideaki / 吉藤英明
2008-05-05T04:25:14Z

In article <200805050342.m453gktl029817@devserv.devel.redhat.com> (at Sun, 4 May 2008 23:42:46 -0400), Ulrich Drepper <drepper@redhat.com> says:

> This patch adds support for flag values which are ORed to the type passwd
> to socket and socketpair. The additional code is minimal. Beside
> decoding the flags with the library function introduced in a prior patch
> all that has to be done is to pass the new value around.
>
> The internal functions sock_alloc_fd and sock_map_fd get a new parameters
> and all callers are changed.

Well, this seems the only patch that overrides basic context of the
arguments. (Or, we have already "flags" argument for other APIs
that do not require new API.)

To me, it seems overriding 2nd argument is a too ad-hoc workaround,
and introducing new syscalls with flags is cleaner, e.g.,
psocket(family, socktype, protocol, flags);
psocketpair(d, type, protocol, int sv[2], flags);

--yoshfuji