[PATCH] net: add more sockopt options

Dmitry V. Levin ldv at altlinux.org
Sun Feb 16 22:51:17 UTC 2014


On Sun, Feb 16, 2014 at 02:24:47AM -0500, Mike Frysinger wrote:
> On Wednesday, February 05, 2014 06:40:05 Dmitry V. Levin wrote:
[...]
> > I've automatically converted most of xlat structures to this XLAT form.
> 
> looks great.  the ifdef stuff still annoys me.  we can't really define 
> 
> fallbacks to random values since any value is possible with these things.  
> what if we created like .xlat.in files ?  a script would take care of 
> generating the full contents.  see the crazy idea below.

Very nice!  What a pity not all constants are macros.

[...]
> +gen_header() {
> +	local input="$1" output="$2" name="$3"
> +	local line
> +	echo "generating ${output}"
> +	(

> +	echo "/* Generated by $0 from $1; do not edit. */"
> +	echo "const struct xlat ${name}[] = {"

static?

> +	while read line ; do
> +		case ${line} in
> +		"/"|"#"|"")

You mean
	/*|\#*|'')
to forward preprocessor directives and comments?


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20140217/2b0f4dbb/attachment.bin>


More information about the Strace-devel mailing list