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

From: YOSHIFUJI Hideaki / 吉藤英明
Date: Mon May 05 2008 - 00:25:15 EST


In article <200805050342.m453gktl029817@xxxxxxxxxxxxxxxxxxxxxxxx> (at Sun, 4 May 2008 23:42:46 -0400), Ulrich Drepper <drepper@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/